通过Log4j.properties配置 ibatis 在控制台输出执行的sql
Log4j.properties加入如下代码
- # Set root logger level to DEBUG and its only appender to CONSOLE.
- log4j.rootLogger=WARN,CONSOLE
- # CONSOLE
- log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
- log4j.appender.stdout=org.apache.log4j.ConsoleAppender
- log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
- log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
- log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
- log4j.appender.CONSOLE.Threshold=INFO
- 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
相关推荐
周公周金桥 2020-09-06
大象从不倒下 2020-07-31
AlisaClass 2020-07-19
MaureenChen 2020-04-21
xingguanghai 2020-03-13
teresalxm 2020-02-18
木四小哥 2013-05-14
SoShellon 2013-06-01
Simagle 2013-05-31
羽化大刀Chrome 2013-05-31
waterv 2020-01-08
LutosX 2013-07-29
vanturman 2013-06-27
wutongyuq 2013-04-12
luoqu 2013-04-10
today0 2020-09-22
89520292 2020-09-18