logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Is it possible to configure different log levels for the same appender based on what logger it is coming from?
Date Wed, 20 Oct 2010 21:39:03 GMT
Hello Adam,

Do you have access to the source code where logger A is defined and used?

--
Ceki - http://logback.qos.ch/

On 20/10/2010 11:23 PM, Adam Creeger wrote:
> Hello all,
>
> I have a question regarding how I might configure Log4J to support the
> following scenario:
>
> The root logger has an appender (let's call this Appender Z) with a
> threshold of INFO. There is some important "info" messages that get logged
> to that root logger, so we can't set the threshold any higher...
>
> Logger A has some verbose "info" logging that we wish to log to a separate
> appender (Appender Y). We want Logger A's "warn" and "error" messages to
> appear in the root logger, but not Logger A's "info" messages. It is totally
> fine for Logger A's "warn" and "error" messages to appear in Appender Y.
>
> If I set additivity to false on Logger A, none of its "warn" or "error"
> messages will make it to Appender Z. If I leave additivity as true, all of
> its "info" messages will appear in Appender Z, which is not what we want.
>
> Is there something I'm missing here?
>
> Thanks!
>
> Adam
>


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


Mime
View raw message