5

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

Community
  • 1
  • 1
Jonathan Lebrun
  • 1,462
  • 3
  • 20
  • 42

1 Answers1

10

We did it in Config.groovy,

log4j = {
// ... whatever

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

Log4j is configured differently since Grails 1.1.

Victor Sergienko
  • 13,115
  • 3
  • 57
  • 91