log4j

log4j

log4j.rootLogger=debug,error,stdout,DailyLog,info,warn

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[project] [%d{yyyy-MM-dd HH:mm:ss,SSS}][%-5p][%c][%t] %m\n

log4j.appender.DailyLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DailyLog.File=/tmp/project/debug.log 
log4j.appender.DailyLog.Append=true
log4j.appender.DailyLog.DatePattern='.'yyyy-MM-dd
log4j.appender.DailyLog.layout=org.apache.log4j.PatternLayout
log4j.appender.DailyLog.layout.ConversionPattern=[project] [%d{yyyy-MM-dd HH:mm:ss,SSS}][%-5p][%c][%t] %m\n

log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern=[project] [%d{yyyy-MM-dd HH:mm:ss,SSS}][%-5p][%c][%t] %m\n
log4j.appender.error.datePattern='.'yyyy-MM-dd
log4j.appender.error.Threshold = ERROR 
log4j.appender.error.append=true
log4j.appender.error.File=/tmp/project/error.log 

log4j.appender.info=org.apache.log4j.DailyRollingFileAppender
log4j.appender.info.layout=org.apache.log4j.PatternLayout
log4j.appender.info.layout.ConversionPattern=[project] [%d{yyyy-MM-dd HH:mm:ss,SSS}][%-5p][%c][%t] %m\n
log4j.appender.info.datePattern='.'yyyy-MM-dd
log4j.appender.info.Threshold = INFO 
log4j.appender.info.append=true
log4j.appender.info.File=/tmp/project/info.log 


log4j.appender.warn=org.apache.log4j.DailyRollingFileAppender
log4j.appender.warn.layout=org.apache.log4j.PatternLayout
log4j.appender.warn.layout.ConversionPattern=[project] [%d{yyyy-MM-dd HH:mm:ss,SSS}][%-5p][%c][%t] %m\n
log4j.appender.warn.datePattern='.'yyyy-MM-dd
log4j.appender.warn.Threshold = WARN 
log4j.appender.warn.append=true
log4j.appender.warn.File=/tmp/project/warn.log 

log4j.logger.com.taiping=debug
log4j.logger.org.hibernate=error
log4j.logger.org.springframework=error
log4j.logger.com.opensymphony.xwork2.ognl.OgnlValueStack=error
log4j.logger.org.apache.cxf=error
log4j.logger.com.opensymphony.xwork2=error
log4j.logger.org.apache.struts2=error
log4j.logger.com.google.code=error
log4j.logger.net.bull.javamelody=error
log4j.logger.freemarker=error
log4j.logger.httpclient.wire=error
log4j.logger.org.apache.commons=error

 

posted @ 2021-07-04 22:17  xiluhua  阅读(43)  评论(0编辑  收藏  举报