Log4j properties myibatis配置文件

#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


你可能感兴趣的:(Log4j properties myibatis配置文件)