Jonathan Lebrun
Jonathan Lebrun

Reputation: 1552

How to log sql in grails 1.3.7

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

Upvotes: 5

Views: 2455

Answers (1)

Victor Sergienko
Victor Sergienko

Reputation: 13485

We did it in Config.groovy,

log4j = {
// ... whatever

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

Log4j is configured differently since Grails 1.1.

Upvotes: 10

Related Questions