wood burning stoves*
The moose likes Beginning Java and the fly likes log4j question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "log4j question" Watch "log4j question" New topic
Author

log4j question

Mike Broadbear
Ranch Hand

Joined: Jan 14, 2002
Posts: 39
Hi,

I have an application that logs trace level, but a certain class outputs too much information and I do not have access to that source. Is there a way to continue to log trace level, but to ignore logging (or change the log level) for only that class?

Mike Broadbear
Ranch Hand

Joined: Jan 14, 2002
Posts: 39
I figured it out.

Just add a logger to the properties file:

log4j.logger.(package.prefix)=INFO
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: log4j question
 
Similar Threads
Enabling WS Security for XML Encryption of an EJB Web Service
Class specific logging level in log4j
applet loading forever...
Connection reset by peer: socket write error
Is this small piece of code thread-safe?