本文介绍了如何在grails 1.3.7中记录sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在数据源(测试环境)中使用logSql = true在grails中配置sql的日志,但是在测试输出中没有显示任何内容。 我读过这篇文章,但是这是行不通的。
如何在Grails中记录SQL语句
谢谢 解决方案
我们在Config.groovy中完成了它,
log4j = { // ...任何 debug'org.hibernate.SQL','org.hibernate.transaction'//可选}自Grails 1.1以来,Log4j的配置有所不同。
I try to configure logs for sql in grails with logSql=true in datasource (test env) but nothing is displayed in test output.
I read this post but It's not working.
How to log SQL statements in Grails
Thanks
解决方案We did it in Config.groovy,
log4j = { // ... whatever debug 'org.hibernate.SQL', 'org.hibernate.transaction' // optionally }Log4j is configured differently since Grails 1.1.
更多推荐
如何在grails 1.3.7中记录sql
发布评论