log4j每天产生一个日志文件
#log4j.rootLogger=INFO,A1
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
#log4j.appender.A1.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n
log4j.rootLogger=error,logfile
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.Target=
System.err
#log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
log4j.appender.logfile=org.apache.log4j.FileAppender
log4j.appender.logfile.DatePattern ='_'yyyy-MM-dd'.log'
log4j.appender.logfile.File=D:/Project.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [%c]-[%p] %m%n
不管用
------解决方案--------------------#org.apache.log4j.DailyRollingFileAppender(每天产生一个日志文件),