log4j 日志每日生成一个
# This is the configuring for logging displayed in the Application Server
log4j.rootLogger=INFO, R
# Replace the line above if you want to put a log file into the directory
# you start Tomcat from
# log4j.rootCategory=INFO, stdout, R
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
#log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] [%t] [%L] [%x]%n- %m%n
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
# You can change this to be an absolute path or even an environment variable
# If you're using an environment variable, you will have to set JAVA_OPTS
# to contain this variables - for example in the catalina.sh or catalina.bat
# file
#log4j.appender.R.File=D\:\\monitor\\log\\monitor_consume.log
log4j.appender.R.File=/opt/log/pingandf.log
#log4j.appender.R.MaxFileSize=51200KB
# Don't keep a backup file
#log4j.appender.R.MaxBackupIndex=3
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %p [%c] [%t] [%L] [%x]%n- %m%n
备注: 单日的为:pingAn.log, 前一天的为: pingAn.log.2016-10-10