log4j 输出hibernate和iBATIS的sql语句

## Hibernate logging configuration... ##
#log4j.logger.org.hibernate=info
log4j.logger.org.hibernate.SQL=debug
log4j.logger.org.hibernate.HQL=debug


## Ibatis logging configuration... ##
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

你可能感兴趣的:(Java)