logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Erskine <mse...@googlemail.com>
Subject Re: How to roll the file based on size and time?
Date Fri, 19 Feb 2010 14:54:27 GMT
On 19 February 2010 14:08, Bruno Melloni <Bruno.Melloni@chickasaw.net> wrote:
> Indeed, I once wrote my own and it wasn't too hard.
> Still, it is surprising that an appender for such a common need was never included in
the basic set.

It is not surprising when you try to fulfil _everybody's_ needs :)

I know -- I tried -- I quit! My quicker solution was to write a little
helper class for the standard DailyRollingFileAppender that applied a
"maxBackup" property to limit the number of days' logs to be retained
to avoid disks filling up. I didn't attempt to limit the amount of
data stored in each file like the RollingFileAppender maxFileSize
property or an of the other complexities.

I shudder to think of the comprehensive unit test suite to thoroughly
validate and verify a unified DailyRollingFile/RollingFile appender.

Michael Erskine.

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

View raw message