|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
log4j w/apacheHello
Newbie on ussing log4j and now that I have a simplistic log4j configuration file I am seeing ALL of the apache all from org.apache.commons.digester.Digester or org.apache.commons.digester.Digester.sax. How can I stop that but still keep a simple or reconfigure my log4j.properties? tia. |
|
|
Re: log4j w/apacheThis is described here:
http://www.mail-archive.com/log4j-user@.../msg10697.html If you truly want them to go nowhere you can do this: log4j.logger.org.apache.commons.digester.Digester=WARN, nowhere log4j.logger.org.apache.commons.digester.Digester.sax=WARN, nowhere log4j.appender.nowhere=org.apache.log4j.varia.NullAppender log4j.additivity.nowhere=false The real trick is that you have to send those messages to a logger that won't pass them up (i.e. additivity=false). Using the documentation you should be able to take it from here. --Chris On Wed, Jun 24, 2009 at 4:29 PM, cpanon<cpanon@...> wrote: > Hello > Newbie on ussing log4j and now that I have a simplistic log4j configuration file I am seeing ALL of the apache all from org.apache.commons.digester.Digester or org.apache.commons.digester.Digester.sax. How can I stop that but still keep a simple or reconfigure my log4j.properties? tia. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: log4j w/apache-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Chris, On 6/25/2009 8:54 AM, Christopher Piggott wrote: > log4j.logger.org.apache.commons.digester.Digester=WARN, nowhere > log4j.logger.org.apache.commons.digester.Digester.sax=WARN, nowhere Strictly speaking, it doesn't matter what level (e.g. WARN) you choose if you've going to send everything to the bit bucket. > log4j.appender.nowhere=org.apache.log4j.varia.NullAppender > log4j.additivity.nowhere=false This is only required is you really don't want to see /anything/ from Apache classes. I would recommend just setting the Apache-classes logger to WARN like this: log4j.logger.org.apache=WARN ...and leave it at that. You might actually want to see warnings from these classes, but certainly TRACE-level detail from them is is way too much to see. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkpNbXsACgkQ9CaO5/Lv0PBcUQCgv1GzD+FlKUiTKSRJikVR3LTm i5UAoI9ds2H9z7j0m6jBhZBeQwYZqtqi =JAIq -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |