logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Auinger, Thomas" <Thomas.Auin...@wincor-nixdorf.com>
Subject RFE: provide a way to specifiy the names of the RollingFileAppend er's backup files
Date Wed, 25 Sep 2002 09:29:54 GMT
Hi!

In the current implementation, the RollingFileAppender always
names backup files to "<filename>.1", "<filename>.2" etc.

It would be great, if developers could add their own naming
convention.

This could be done using different ways (I think):

a) The developer sets a naming pattern String as a parameter
to the RollingFileAppender, which defines the filename (similar
to PatternLayout), e.g. "%f.%d.%n", where %f = filename, %d = date,
%n = backupIndex


b) The developer implements an interface, which provides a
single method to generate a filename for a backup file:

 public interface BackupFilenameResolver {
 
 	public String getFilename( int backupIndex );
 
 }

An implementing class name of this interface may then be set
as a parameter to the RollingFileAppender (similar to how
ObjectRenderers are currently configured)


I would prefer soultion (b), since it is more flexible.


Greetings from Germany,
 Thomas

--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message