logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <curt.arn...@comcast.net>
Subject Fwd: Different log files
Date Tue, 07 Aug 2007 20:52:26 GMT



Begin forwarded message:

> From: Curt Arnold <curt.arnold@comcast.net>
> Date: August 7, 2007 3:43:45 PM CDT
> To: Log4CXX User <log4cxx-user@logging.apache.org>
> 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"  
> <andremailinglist@gmail.com> 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

Mime
View raw message