赞
踩
- #log4j.rootLogger=CONSOLE,info,error,DEBUG
- log4j.rootLogger=infoA,errorA,CONSOLE,DEBUGA //注意这里不要用INFO,DEBUG等 改个名字
-
- log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
- log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
- log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
-
- log4j.logger.infoA=info
- log4j.appender.infoA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.infoA.layout=org.apache.log4j.PatternLayout
- log4j.appender.infoA.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
- log4j.appender.infoA.datePattern=yyyy-MM-dd'.log'
- log4j.appender.infoA.Threshold = info
- log4j.appender.infoA.append=true
- #log4j.appender.info.File=/home/admin/pms-api-services/logs/info/api_services_info
- log4j.appender.info.File=d:/log/info.log
-
- log4j.logger.errorA=error
- log4j.appender.errorA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.errorA.layout=org.apache.log4j.PatternLayout
- log4j.appender.errorA.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
- log4j.appender.errorA.datePattern=yyyy-MM-dd'.log'
- log4j.appender.errorA.Threshold = error
- log4j.appender.errorA.append=true
- #log4j.appender.error.File=/home/admin/pms-api-services/logs/error/api_services_error
- log4j.appender.error.File=d:/log/error.log
-
- log4j.logger.DEBUGA=DEBUG
- log4j.appender.DEBUGA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DEBUGA.layout=org.apache.log4j.PatternLayout
- log4j.appender.DEBUGA.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
- log4j.appender.DEBUGA.datePattern=yyyy-MM-dd-HH-mm'.log'//这里是后缀
- log4j.appender.DEBUGA.Threshold = DEBUG
- log4j.appender.DEBUGA.append=true
- #log4j.appender.DEBUG.File=/home/admin/pms-api-services/logs/debug/api_services_debug
- log4j.appender.DEBUGA.File=d:/log/debug_log //这里设置文件前缀,加个符号,不然报错
-
- ### Debug
- log4j.logger.com.ibatis=DEBUG
- log4j.logger.java.sql.ResultSet=INFO
- log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
- log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
- log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
- log4j.logger.java.sql.Connection=DEBUG
- log4j.logger.java.sql.Statement=DEBUG
- log4j.logger.java.sql.PreparedStatement=DEBUG
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。