On Tue, 1 Oct 2013 18:17:41 +0200
 fedinho <fedi...@gmail.com> wrote:
Hi.

A simple question I hope someone can help me with. This is using log4j 1.2.x

I would like to log info level to one appender A and warn level to another
appenderB.

However, I would like to log debug messages from class X to appender A, and
debug messages from class Y to appender B.

Thanks for any tips for a configuration that will work. Threshold is not
the way to go. Is there a way A and B can have different root loggers or
categories?


This is usually done by setting the logger additivity to "false" for either the logger in question or one it inherits from, which essentially makes the logger with additivity=false the root logger for all inheritors.  See...

http://logging.apache.org/log4j/1.2/manual.html#Appenders_and_Layouts


Kind regards
Fredrik


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

Reply via email to