Rolling logs by both size and time
问题 I use RollingFileAppender of log4j 1.2.16 , which rolls log files, when they reach a certain size. Now I would like to roll log files daily and when they reach a certain size. Thus there will be one or more log files per day. For example, myapp.log myapp-17.12.2013.log myapp-16.12.2012.log myapp-16.12.2012.1.log myapp-16.12.2012.2.log Is there an off-the-shelf appender, which does it already? 回答1: There are indeed two options: use LogBack with its size and time triggering policy: http:/