【问题标题】:How to log sql in grails 1.3.7如何在 grails 1.3.7 中记录 sql
【发布时间】:2011-07-08 18:57:37
【问题描述】:

我尝试在数据源(测试环境)中使用 logSql=true 为 grails 中的 sql 配置日志,但测试输出中没有显示任何内容。

我读了这篇文章,但它不起作用。

How to log SQL statements in Grails

谢谢

【问题讨论】:

    标签: grails grails-orm


    【解决方案1】:

    我们在 Config.groovy 中做到了,

    log4j = {
    // ... whatever
    
        debug    'org.hibernate.SQL',
                 'org.hibernate.transaction' // optionally
    }
    

    Log4j is configured differently since Grails 1.1.

    【讨论】:

      猜你喜欢
      • 2011-02-03
      • 2013-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多