This content has been marked as final.
Show 2 replies
-
1. Re: log4j DailyRollingFileAppender compression???
peterj Sep 30, 2010 12:27 PM (in response to acc01)Log4J does not provide a compression option. But considering that the daily log file switch happens at midnight, you could set up a simple cron job that compresses the latest log file.
The DailyRollingFileAppender does not have a maxBVackupIndexp roperty like the RollingFileAppender does, but since you already have a cron job to compress the daily log, ;-) ,you can add some code to remove logs older then one month.
-
2. Re: log4j DailyRollingFileAppender compression???
genman Sep 30, 2010 1:09 PM (in response to acc01)If you dig into the log4j source code for the abandonded 1.3 branch, there is an appender that does compression at rotate time. See: http://logging.apache.org/log4j/1.3/index.html