Enable Hibernate SQL Logging in Grails

Posted 05/18/2017 6:08 PM by Corey Klass

It's often useful when debugging a Grails application to be able to see the exact SQL that is being executed in the database.

If you're using GORM, you can modify your /grails-app/conf/application.yml file with the following settings. Each Hibernate statement that is executed will be outputted to the standard console.

    logSql: true
    formatSql: true