疑问:hibernate 输出SQL到日志文件
据说把hibernate输入的SQL配置到日志文件(log4j),需要另外用到三个jar包,
1:slf4j-api-XXX.jar
2:slf4j-log4j12-XXX.jar
3:log4j-XXX.jar
这三个包,我已经添加了,log4j.properties的hibernate的配置如下:
log4j.logger.org.hibernate.type=TRACE
log4j.logger.org.hibernate.sql=DEBUG
log4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
log4j.logger.org.hibernate.type.descriptor.sql.BasicExtractor=TRACE
log4j.logger.org.hibernate.engline.QueryParameters=DEBUG
log4j.logger.org.hibernate.engline.query.HQLQueryPlan=DEBUG