logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Iain.Sheph...@barclayscapital.com>
Subject RE: RollingFileAppender with stable filenames?
Date Mon, 15 Aug 2005 08:27:16 GMT
> > So I'd like a RollingFileAppender that uses stable filenames, in
> > sequence:
> >
> > my.log.1 << Deleted, because MaxBackupIndex=2
> > my.log.2
> > my.log.3
> > my.log.4 << Current file
> >
> > <snip>
> There are two different RollingFileAppender implementations 
> in log4j:  
> org.apache.log4j.RollingFileAppender which has been around for a  
> while and org.apache.log4j.rolling.RollingFileAppender (with an  
> extra .rolling in the package name) that was introduced in the log4j  
> 1.3 branch.  The "new" RFA allows pluggable TriggeringPolicy 
> (when to  
> initiate a rollover) and RollingPolicy (how the files are named).   
> Your scenario looks like it would be able to use the existing  
> SizeBasedTriggeringPolicy but would need a custom RollingPolicy (or  
> some enhancement to the FixedWindowRollingPolicy).
> You didn't mention if you were looking for something on the 
> log4j 1.2  
> branch or the 1.3 branch.  It seems plausible to add a suitable  
> rolling policy to the 1.3 branch.  I don't think enhancing the  
> FixedWindowRollingPolicy would be appropriate since the new behavior  
> would be inconsistent with the name.

Thanks Curt,

I probably ought not to be relying on the 1.3 branch until you have a
release version.

But I will look at the new RollingFileAppender and see if I can backport
it or generally hack it to 
fit my needs.


For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.

Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message