Just to add my two cents to the other responses, Digester only uses two logging categories, "...Digester" and "...Digester.sax". That means that you can't use the usual Log4J config hacks of tweaking category priorities to reduce noise. You'll want to make effective use of all the Log4J options, in particular:
- pattern layout options to show you the class and method being invoked (something folks tend not to use because of the performance hit - don't leave these on for long, just long enough to track down a problem). - filters to control which messages you see. Here is an example of a log4.xml file that will let you do both. The filters are commented out so that initially you get all Digester DEBUG and Digester.sax INFO messages. If you uncomment the filters then you'll restrict yourself to messages that contain the specified string (ObjectCreateRule in this case). You can add more StringToMatch filters to allow more and more log messages through; the final DenyAllFilter junks anything you don't want. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE log4j:configuration SYSTEM 'log4j.dtd'> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug='false'> <appender name='CONSOLE' class='org.apache.log4j.ConsoleAppender'> <param name='Target' value='System.out'/> <layout class='org.apache.log4j.PatternLayout'> <param name='ConversionPattern' value='%d{ABSOLUTE} %-5p [%C{2}.%M] %m%n'/> </layout> <!-- <filter class='org.apache.log4j.varia.StringMatchFilter'> <param name='StringToMatch' value='ObjectCreateRule' /> </filter> <filter class='org.apache.log4j.varia.DenyAllFilter'/> --> </appender> <category name='org.apache.commons.digester.Digester'><priority value='DEBUG'/></category> <category name='org.apache.commons.digester.Digester.sax'><priority value='INFO'/></category> <root> <priority value='INFO'/> <appender-ref ref='CONSOLE'/> </root> </log4j:configuration> --- Gao Di <[EMAIL PROTECTED]> wrote: > i find the setlogger() and getlogger() method in > digester,but i have never used any log api,anyone > can > tell me how to use it and let me see the log > infomation to help me debug? > > _________________________________________________________ > Do You Yahoo!? > 150����MP3����ѣ������������ֵ��� > http://music.yisou.com/ > ��Ů����Ӧ�о��У��ѱ���ͼ����ͼ�Ϳ�ͼ > http://image.yisou.com > 1G����1000�ף��Ż������������ݣ� > http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
