logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DOUTCH GARETH-GDO003" <Gareth.Dou...@motorola.com>
Subject Simultaneous output at different levels
Date Fri, 23 Jan 2009 13:02:23 GMT
How can I configure a logger to log to two appenders simultaneously at
different levels, i.e. file at debug (+ higher) and socket at info (+
higher)?

This is my properties file:
 
log4j.logger.myapp=debug, ROLLING_FILE, CHAINSAW_CLIENT

log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
log4j.appender.CHAINSAW_CLIENT.Port=4445
log4j.appender.CHAINSAW_CLIENT.LocationInfo=true

log4j.appender.ROLLING_FILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLING_FILE.File=C:\\workdir\\log4j.csv
log4j.appender.ROLLING_FILE.MaxFileSize=200KB
log4j.appender.ROLLING_FILE.MaxBackupIndex=10
log4j.appender.ROLLING_FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLING_FILE.layout.ConversionPattern=%d{dd MMM yyyy
HH:mm:ss} -- %p -- %m%n

Thanks

---------------------------------------------------------------------
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