Where did you come up with the syntax

log4j.monLogger = WARN

That is not the way to specify a level for an appender and your appender is not named monLogger.


How about:

log4j.logger.STUFFLoger=WARN

See http://logging.apache.org/log4cxx/manual/ Introduction.html#Configuration


On Apr 21, 2005, at 3:17 PM, Thierry Lam wrote:

How do I control the output of a specific logger?
For example:

LoggerPtr stufflog(Logger::getLogger("STUFFLoger"));

LOG4CXX_INFO(stufflog, "Stuff testing");

My config file:
log4j.rootLogger=DEBUG, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n

log4j.monLogger = WARN



The line log4j.monLogger = WARN doesn't seem to suppress the output
"Stuff testing".  Any idea what I'm doing wrong or the proper way to do
it?

Thanks
Thierry         




Reply via email to