本文介绍了如何在 grails 1.3.7 中记录 sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在数据源(测试环境)中使用 logSql=true 为 grails 中的 sql 配置日志,但测试输出中未显示任何内容.
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.
如何在 Grails 中记录 SQL 语句
谢谢
推荐答案我们在 Config.groovy 中做到了,
We did it in Config.groovy,
log4j = { // ... whatever debug 'org.hibernate.SQL', 'org.hibernate.transaction' // optionally }Log4j 的配置与 Grails 1.1 不同.
更多推荐
如何在 grails 1.3.7 中记录 sql
发布评论