logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blok, Eelke" <eelke.b...@numico.com>
Subject RE: parent logger to filter child logger by level
Date Tue, 18 Dec 2007 07:56:43 GMT
Just one additional comment, although implicit in Curt's comment, I
think Howard is/was missing the fact there is a difference between
logger level and appender threshold. 

The logger level (either explicitly set or implicitly inherited)
controls whether a log messags enters the tree (after that, it is not
affected by the level of any loggers it passes whil traversing the
If the log message then reaches an appender, the *appender's* threshold
(which has nothing to do with the level of the logger that appender is
attached to) determines if the log message is actually processed by the

-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org] 
Sent: maandag 17 december 2007 21:57
To: Log4J Users List
Subject: Re: parent logger to filter child logger by level

On Dec 17, 2007, at 1:50 PM, Mak, Howard wrote:

> Thanks for your response.
> Here is what I'm trying to achieve:
> (1)     File A contains all logs
> (2)     File B contains only the FATAL/ERROR/WARN logs in file A
> In other words, (2) provides a bird's eye view of problems that can be

> easily missed when reading in (1) (which can be quite big).
> Is my only option to write a filter-by-Level appender to be used by 
> (1)?
> - Howard

Set the level on rootLogger to ALL, attach two appenders to the root
logger, set the threshold on the second appender to WARN.

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

View raw message