TimeAndSizeRollingAppender, a very handy Log4J appender that supports rolling log files by time and size. I haven’t found one that meet my requirements in the built-in/extra appenders provided by log4j project. DailyRollingFileAppender is the closest appender I could live with, but there is no way to control size of the file when rolling, which is very useful when triaging application issues at debug level trace.
TimeAndSizeRollingAppender appender is pretty cool, loving it so far. Compression is built-in and super easy to configure. It has many features and this comparison covers those in detail. Here is a sample log4j.properties file that I ended up using: