我想每天在我的日志文件末尾添加时间戳。意味着每天的日志文件应该看起来像 test.2013-01-10.log
我的新 log.properties 文件如下。请帮助
log4j.rootLogger=info,myapp
log4j.appender.myapp=org.apache.log4j.DailyRollingFileAppender
log4j.appender.myapp.ImmediateFlush=true
log4j.appender.myapp.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.myapp.layout.ConversionPattern=%d{yyyy-MM-dd}%m%n
log4j.appender.myapp.file=${catalina.base}/logs/myapplog/test
log4j.appender.myapp.DatePattern='_'yyyy-MM-dd
#log4j.appender.myapp.MaxFileSize=999MB
#log4j.appender.myapp.MaxBackupIndex=20
log4j.appender.myapp.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender
log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%m%n
log4j.logger=info,stdout,myapp
log4j.logger.org.hibernate=warn