Begin forwarded message:
From: Curt Arnold <[EMAIL PROTECTED]>
Date: August 7, 2007 3:43:45 PM CDT
To: Log4CXX User <[email protected]>
Subject: Re: Different log files
The same issue was recently discussed on log4j-user (thread started
on 26 July), though it didn't seem to end with a clean resolution.
The approach would be to attach multiple appenders to the root
logger with their thresholds set to the desired level. That would
result in one file having debut and above, another info and above,
etc. To limit the files to have only one level, add a
levelmatchfilter. See src/test/input/xml/filters* for examples. I
believe you will need to use XML configuration.
On Aug 7, 2007, at 8:53 AM, "Andrew Hole"
<[EMAIL PROTECTED]> wrote:
Could you tell me how to create different log files for different
levels?
log4j.appender.A1=org.apache
.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %
log4j.appender.A1.Threshold=DEBUG
log4j.appender.A1.File=./LogonApplication_Debug.log
log4j.appender.A1.Append=true
I want an output file for each level (INFO, DEBUG, WARNING...)
Thanks a lot