Log Sql in grails for a piece of code

There are time when we need to see the sql logging statement just for a method of for a particular code. Although we already have logSql property in DataSource to do it for us but it sometimes makes difficult if we need to see the log for a small piece of code rather than for whole project. So I need something that will execute my code...

by Uday Pratap Singh
Tag: sql logging for code