How to log sql in grails 1.3.7

倾然丶 夕夏残阳落幕 提交于 2019-12-01 03:23:19

问题


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


回答1:


We did it in Config.groovy,

log4j = {
// ... whatever

    debug    'org.hibernate.SQL',
             'org.hibernate.transaction' // optionally
}

Log4j is configured differently since Grails 1.1.



来源:https://stackoverflow.com/questions/5193539/how-to-log-sql-in-grails-1-3-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!