Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 537
Jonathan Lebrun Avatar asked Mar 04 '11 12:03

Jonathan Lebrun


1 Answers

We did it in Config.groovy,

log4j = {
// ... whatever

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

Log4j is configured differently since Grails 1.1.

like image 94
Victor Sergienko Avatar answered Oct 03 '22 06:10

Victor Sergienko