To do size-based rollover, update the numeric value of the following lines:
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=5
The last two lines limit the log file size to 10MB and the number of backup files to 5.
You can also do time-based rollover. You can set a date or do daily rollover. To do a daily rollover, change:
log4j.appender.file=org.apache.log4j.FileAppender to log4j.appender.file=org.apache.log4j.DailyRollingFileAppender. This change rolls over the log file every midnight.
Did this help? You can provide feedback at Jazz.net (registration required): Comment in the forums or submit a bug