How do you get log4j to roll files based on date and size?

Looks like you want a mix of the http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html and the http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/RollingFileAppender.html.

You’ll have to code by yourself. The good news is: you’ll just have “merge” those classes functionality, no “low level” new code required.

Leave a Comment