log4j.properties 文件,放在 src 下

log4j.rootLogger=INFO,CONSOLE,ERRORLOG
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Target=System.out
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c %x - %m%n
log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t]  %x - %m%n
log4j.appender.ERRORLOG=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ERRORLOG.Threshold=ERROR
log4j.appender.ERRORLOG.Append=true
log4j.appender.ERRORLOG.DatePattern='_'yyyyMMdd'.log'
log4j.appender.ERRORLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.ERRORLOG.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c %x - %m%n
log4j.appender.ERRORLOG.File=../AppErrorLog
log4j.logger.com.ibatis = DEBUG  
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
log4j.logger.java.sql.ResultSet = DEBUG
posted @ 2019-06-23 08:17  allenbackpacker  阅读(1419)  评论(0编辑  收藏  举报