log4j slf4j日志
大家好,为什么我用log4j,或slf4j时老是不能再本地生成日志文件呢,只能在控制台显示日志文件,陪着如下:
log4j.rootLogger=INFO,A1,R
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.Target=System.out
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%c]%m%n
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.Threshold=INFO,DEBUG,ERROR,WARN
log4j.appender.R.File=${webName.root}/WEB-INF/logs/log/log.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.Encoding=utf-8
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout.ConversionPattern=%d-[HL] %p %t %c - %m%n
log4j.rootLogger=INFO,A1,R,E
log4j.addivity.org.apache=true
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.Target=System.out
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%c]%m%n
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.Threshold=INFO,DEBUG,ERROR,WARN
log4j.appender.R.File=log/log.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.Encoding=utf-8
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout.ConversionPattern=%d-[HL] %p %t %c - %m%n
log4j.appender.E=org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.Threshold=ERROR
log4j.appender.E.File=log/error.log
log4j.appender.E.layout=org.apache.log4j.PatternLayout
log4j.appender.E.Encoding=utf-8
log4j.appender.E.DatePattern='.'yyyy-MM-dd
log4j.appender.E.layout.ConversionPattern=%d-[HL] %p %t %c - %m%n