日期:2014-05-18 浏览次数:20713 次
#logger level default is INFO
log4j.rootLogger=info,console,file
#append to console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d %p - %m%n
#append to file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/demo.log
log4j.appender.file.MaxFileSize=1MB
log4j.appender.file.MaxBackupIndex=10000
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p - %m%n
#ibatis logger config
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,stdout
<!--log-begin-->
<dependency>
<groupId>org.slf4j</groupId>