-
Notifications
You must be signed in to change notification settings - Fork 27
Logging and debugging
y-yoshinoya edited this page Feb 14, 2013
·
6 revisions
There are few ways of seeing the generated SQL
println(User.where(_.name like "john%").orderBy(_.age desc).toSql))
Using Logback, customize the xml configuration: (e.g.: src/main/resources/logback.xml)
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%-5level) %cyan(%logger{15}) - %msg %n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
You will see every statements, and a dump of result sets of the seesion.