log4j.xml
<appender name= "DailyRollingFileAppender " class= "org.apache.log4j.DailyRollingFileAppender ">
<param name= "Append " value= "true " />
<param name= "File " value= "E:/test " />
<param name= "DatePattern " value= "yyyyMMdd '.log ' " />
<layout class= "org.apache.log4j.PatternLayout ">
<param name= "ConversionPattern " value= "[%-5p]%d{yyyy-MM-dd HH:mm:ss.SSS} %n%m%n%n " />
</layout>
</appender>
第二天产生日志的时候报错:
log4j:ERROR Failed to rename [E:/test] to [E:/test20070313.log].
------解决方法--------------------------------------------------------
应该是你文件系统的权限的问题,而不是log4j的问题