Log4j配置

log4j.debug=true

log4j.rootLogger=DEBUG,D,E

log4j.appender.E = org.apache.log4j.DailyRollingFileAppender

log4j.appender.E.File = logs/logs.log

log4j.appender.E.Append = true

log4j.appender.E.Threshold = DEBUG

log4j.appender.E.layout = org.apache.log4j.PatternLayout

log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss}  [ %t:%r ] - [ %p ]  %m%n

#log4j.appender.E.layout.

log4j.appender.D = org.apache.log4j.DailyRollingFileAppender

log4j.appender.D.File = logs/error.log

log4j.appender.D.Append = true

log4j.appender.D.Threshold = ERROR

log4j.appender.D.layout = org.apache.log4j.PatternLayout

log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss}  [ %t:%r ] - [ %p ]  %m%n



log4j.properties

你可能感兴趣的:(Log4j配置)