标签:
# file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.maxFileSize=2MB log4j.appender.file.maxBackupIndex=50 log4j.appender.file.File=./log/log.log log4j.appender.file.threshold=debug log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %l - %m%n # stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %l - %m%n # html log4j.appender.html=org.apache.log4j.FileAppender log4j.appender.html.File=./log/log.html log4j.appender.html.MaxBackupIndex=3 log4j.appender.html.layout=org.apache.log4j.HTMLLayout log4j.appender.html.layout.Title=HTML Layout Example log4j.appender.html.layout.LocationInfo=true # rootLogger log4j.rootLogger=info, stdout, file # log level log4j.logger.net.phoenix.learn.log4jsample=debug
log4j.properties配置可参考该博文http://blog.csdn.net/edward0830ly/article/details/8250412
标签:
原文地址:http://www.cnblogs.com/phoenix-smile/p/5923592.html