logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Renaming log file
Date Mon, 28 Jan 2008 16:11:30 GMT

On Jan 28, 2008, at 6:47 AM, James A. N. Stauffer wrote:

> I'm not sure what you want but RollingFileAppender will make files
> like what you want.

If you do need to write custom code, I would recommend writing a  
custom RollingPolicy for the  
org.apache.log4j.rolling.RollingFileAppender (o.a.l.r.RFA) in the  
extras companion (http://logging.apache.org/companions/extras).  The  
o.a.l.r.RFA was designed to support pluggable RollingPolicies which  
provide the strategy for renaming files and TriggeringPolicies which  
provide the strategy for determining when to trigger files.  It seems  
like you might just want to mix the FixedWindowRollingPolicy (which  
provides .1, .2, etc file names) with a TimeBasedTriggeringPolicy.

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