logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Erskine" <michael.ersk...@ketech.com>
Subject expiry of DailyRollingFileAppender old logs
Date Mon, 10 Dec 2007 10:26:29 GMT

Hi,
I have a requirement to delete logfiles older than a certain number of days
when using a DailyRollingFileAppender. Rather than extend
DailyRollingFileAppender I've decided to execute a task from time to time
that given the name of the Appender, looks for old logfiles that match the
file and datePattern properties and deletes those that appear to be too old.
So far I have the file property matching fine and I'm still working on the
datePattern and wrestling with SimpleDateFormat (which ain't simple!).

I imagine this is a pretty typical requirement so I was wondering if this
has been done elsewhere (probably better!).

Kind Regards
Michael Erskine





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