I would like to create log file that can be rolled at the beginning of the next day or if it\'s reached to specified file size and log file must be contained inside date folder.
To enable the daily rolling: class="org.apache.log4j.DailyRollingFileAppender"
And to enable the max file size and the number of backup files
But you can not put MaxFileSize
with DailyRolling
, so you can use rolling file appender
An example:
Or you can do this http://wiki.apache.org/logging-log4j/DailyRollingFileAppender