You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Thierry Lam <la...@pcigeomatics.com> on 2005/04/22 17:43:32 UTC

Different level messages for console and logfile

For the following given example of the documentation page:

log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

# Print only messages of level WARN or above in the namespace com::foo.
log4j.logger.com.foo=WARN


Is it possible to print messages of a specific logger object of level
WARN to the console and messages of level DEBUG of that same specific
logger object to a logfile? If so, how do we do it?

Thanks
Thierry