logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Park <simon_park_m...@yahoo.co.uk>
Subject TimeAndSizeRollingAppender contribution
Date Thu, 05 Feb 2009 15:44:34 GMT

I've updated the TimeAndSizeRollingAppender that I originally contributed to the Log4J project
back in September 2007.  Whilst this isn't an integration with the (much cooler and more flexible)
Log4J Extras, it does seem to be useful and as far as I know is being used in a handful of
production environments.

This appender has the following features:

	* Rolls by time like the DailyRollingFileAppender.
	* Rolls files by size like the RollingFileAppender.
	* Deletes older backup files like the RollingFileAppender, but backup files are deleted asynchronously
in a single daemon thread.

	* Compresses backup files asynchronously using either ZIP or GZIP, also in a single daemon
	* Configuration is very straightforward - there's only an appender to configure.
Asynchronicity ensures that housekeeping the logs doesn't interfere unduly with application
threads.  However, this puts the onus on the developer to make sure the logging system is
stopped cleanly on application shutdown.

Javadoc, featuring a sample configuration, and JAR download are freely available, distributed
as per the rest of Log4J under the Apache 2.0 license.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message