logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Iain.Sheph...@barclayscapital.com>
Subject RollingFileAppender with stable filenames?
Date Sun, 14 Aug 2005 14:23:58 GMT
Hi,

I'm writing a program which will frequently scan and parse log files.

I want to use RollingFileAppender to write them, but I'm not 100% happy
with its behaviour. I'd have to allow for all the filenames to change
between one scan and the next, or even, conceivably, while I'm actually
in the middle of a scan.

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


Before I knuckle down and write one myself, I just thought I'd ask 
whether anyone else has done this?

I did find Geoff Mottram's DatedFileAppender, but I'm really looking for
something based on RollingFileAppender so I don't have any time-based
issues at all (some of the programs will be running in different time
zones...)

Ta for any advice.

Iain Shepherd


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


Mime
View raw message