log4j.rootLogger = INFO,Console,D,E
#配置此类可以将log日志输出到控制台
log4j.appender.Console = org.apache.log4j.ConsoleAppender
log4j.appender.Console.Threshold=INFO
#自定义的日志布局
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
#自定义的日志布局格式
log4j.appender.Console.layout.ConversionPattern = %d [%t] %-5p [%c] - %m%n
#输出info以上级别到info.log文件中
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = ${catalina.base}/logs/info.log
log4j.appender.D.Append = true
log4j.appender.D.Threshold = INFO
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
#输出error以上级别到error.log文件中
log4j.appender.E= org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File = ${catalina.base}/logs/error.log
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
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
