logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish Marathe" <python.r...@gmail.com>
Subject DailyRollingFileAppender.java enhancement
Date Sun, 20 Jan 2008 21:42:46 GMT
Hello All,

Currently the Appender, DailyRollingFileAppender, rolls over the log file as
per the "datePattern" set in the configuration file, although the
rolled-over files never get deleted unlike if we use RollingFileAppender but
in case of RollingFileAppender we cannot use the datePattern.

In one of our products in my company, SpikeSource
I needed a feature to delete the rolled over oldest files so I extended
DailyRollingFIleAppender.java to add SET and GET methods for maxBackupIndex,
one of the parameters we can set in the configuration file, and implemented
and the deletion of rolled over "oldest".

I would be happy to give this back to log4j community unless someone has
already added the feature.

I am a developer from SpikeSource Inc <http://dev.spikesource.com> and I
plan to blog about it on http://developer.spikesource.com and make it
available from there but its better to include in the library itself and
make it available to the whole community. Actually the feature add and
implementation is so simple and less of a code, if given permission I can
actually modify DailyRollingFileAppender.java and give it back.

Hopefully this will be helpful to someone.


SpikeSource, Inc

View raw message