logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abramson, Rami" <rami.abram...@terayon.com>
Subject RE: How to reach the info of a logged class ?
Date Mon, 07 Apr 2003 10:14:25 GMT
thank you.

-----Original Message-----
From: Ingo Adler [mailto:ingo.adler@synacon.ch]
Sent: Sunday, April 06, 2003 3:42 PM
To: Log4J Users List
Subject: Re: How to reach the info of a logged class ?


Abramson, Rami wrote:

> 1> We do not have a different logger name for each class.

> 2> Regarding: "You could reach it with grep / awk / sed on the log file
;)"
     We would like to filter during logging and not post-logging.

Log4j has two main criteria built in for filtering output:
1. logger names (former category names)
2. levels

In your case - your don't need a different logger for each class. You 
need a logger for each package - or just one logger for package P.
This would be the "standard" solution.

There is an alternative, which uses the location info of the logger 
calls (log.debug ...). But it's not recommended since it's slow. See 
documentation for parameter l in class PatternLayout.

Ingo




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message