我想在每4小时后创建一个日志文件,目前我正在使用以下配置:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
# configure the daily rolling file appender
log4j.appender.DAILY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DAILY.File=/apps/jmt/jmt.log
log4j.appender.DAILY.DatePattern='.'yyyy-MM-dd-HH-mm
log4j.appender.DAILY.layout=org.apache.log4j.PatternLayout
log4j.appender.DAILY.layout.ConversionPattern=%d %p [%c] - <%m>%n
用Google搜索,但没有看到指定时间的选项(即4小时)