log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=${catalina.home}/logs/myapp.log
log4j.appender.A1.DatePattern='-'yyyy-MM-dd'.log'
In this example, your current logfile will be named "myapp.log". At midnight (or when the first log entry occurs on the next day) "myapp.log" will be renamed to "myapp-yyyy-mm-dd.log" (for example,
"myapp-2010-12-21.log") and a new "myapp.log" will be created.