Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Thursday, 5 February 2009

Compression Added

I received a code contribution for the TimeAndSizeRollingAppender from Eduardo Simioni, providing two new features:
  1. Backup log files can be compressed.
  2. The scavenger thread that deletes older files can be configured not to run, thereby conserving resources whilst allowing a virtually unlimited number of backups.
I've extended the contribution to support both GZIP and ZIP via configuration. Obviously you can use only one compression algorithm at a time. New source and binaries available in the usual place.

Saturday, 20 December 2008

TimeAndSizeRollingAppender Updated

Thanks to Eduardo and Nick who pointed out a couple of bugs in the TimeAndSizeRollingAppender. The first was a start-up bug which meant that the writer was not being initialised with the size of an existing log file. The second was an NPE issue that occurred if a filename was configured without a path. Both are fixed and the new code is available for download at http://www.simonsite.org.uk/resources/lib/log4j-rolling-appender.jar.