如何在Grails中记录SQL语句 [英] How to log SQL statements in Grails
问题描述
我希望登录控制台或文件中的所有Grails所做的查询来检查性能。
我配置了 任何想法都会有帮助。 在DataSource.groovy中(根据这些说明)足以让它在我的环境中工作。似乎常见问题的部分内容已过时(例如多对多列向后问题),因此这可能也会在此期间发生变化。 I want to log in the console or in a file, all the queries that Grails does, to check performance. I had configured this without success. Any idea would help. Setting in DataSource.groovy (as per these instructions) was enough to get it working in my environment. It seems that parts of the FAQ are out of date (e.g. "the many-to-many columns backwards" question) so this might also be something that changed in the meantime. 这篇关于如何在Grails中记录SQL语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
数据源{
...
logSql = true
}
datasource {
...
logSql = true
}