logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob L. Anawalt" <janaw...@geckosoftware.com>
Subject Appender filtering
Date Wed, 27 Feb 2008 22:13:39 GMT
Hello,

I want errors >= WARN to go to syslog and nothing else that happens to get 
inserted into the log stream so I attempted to use the Threshold option in 
AppenderSkeleton (which my docs show SyslogAppender inheriting from) mentioned 
in FAQ 2.9 [1].

#PropertyConfigurator file
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.SYSLOG=org.apache.log4j.SyslogAppender

log4j.appender.SYSLOG.Threshold=WARN

#layout lines omitted
log4j.rootLogger=WARN, SYSLOG
log4j.logger.MyApp=DEBUG, CONSOLE
log4j.logger.MyApp.MyClass=INFO

I am getting info and debug messages in my system logs. Any suggestions?

(I can't find examples/sort4.lcf mentioned in the FAQ in either the Debian 4.0 
sources for the package or the svn checkout I just did.)

[1] http://logging.apache.org/log4cxx/faq.html#2.9

-- 
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026

Mime
View raw message