I know that log4j provides RollingFileAppender and DailyRollingFileAppender classes, however, DailyRollingFileAppender does not support MaxFileSize property.
How do I tweak the behavior of log4j so that it can log in a way like this: the rolling policy is based on both time period (and file name is appended with DatePattern), like in DailyRollingFileAppender, and MaxFileSize (like in RollingFileAppender)?
Example:
The log file rolls every hours (file name will be appended time stamp such as YYYY-MM-DD_HH-MM-SS (normally MM and SS will be "00" and "00")
The maxFileSize is limited to 1MB
During the two checkpoints of the roll over cycle every hour, if an event of exceeding maxFileSize occurs, the log file should roll over as well, (which means the minute and second stamp will take some value different than "00")