Sunday, February 1, 2015

How to Show Hibernate SQL Statements in Grails

Problem
You want to see all Hibernate SQL statements when using grails.

Solution
You must have these line of codes inside your conf/Config.groovy configuration file.

log4j = { debug 'org.hibernate.SQL' trace 'org.hibernate.type' }
The SQL statements will appear on the standard output console.