commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reid Pinchback <>
Subject Re: [Digester]how to debug in degister
Date Wed, 08 Sep 2004 01:46:21 GMT
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'>


  <appender name='CONSOLE'
    <param name='Target' value='System.out'/>
    <layout class='org.apache.log4j.PatternLayout'>
      <param name='ConversionPattern'
value='%d{ABSOLUTE} %-5p [%C{2}.%M] %m%n'/>
      <param name='StringToMatch'
value='ObjectCreateRule' />


    <priority value='INFO'/>
    <appender-ref ref='CONSOLE'/>


--- Gao Di <> 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疯狂搜,带您闯入音乐殿堂
> 美女明星应有尽有,搜遍美图、艳图和酷图
> 1G就是1000兆,雅虎电邮自助扩容!
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message