首页 > 代码库 > log4j配置

log4j配置

 

log4j.rootCategory=DEBUG , R, D,stdout# Consolelog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.encoding=UTF-8log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.Threshold = DEBUG log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n# Rlog4j.appender.R=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.R.encoding=UTF-8log4j.appender.R.File=D:/Users/workspace/log/log.loglog4j.appender.R.layout=org.apache.log4j.PatternLayoutlog4j.appender.R.Threshold = DEBUG  log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p ~ %m  ~ %l ~ %c ~ %r%n # Dlog4j.appender.D=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.D.encoding=UTF-8log4j.appender.D.File=D:/Users/workspace/log/error.loglog4j.appender.D.layout=org.apache.log4j.PatternLayoutlog4j.appender.D.Threshold = ERROR log4j.appender.D.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %-5p ~ %m  ~ %l ~ %c ~ %r%n

 

log4j配置