Enable SQL logging in Play 2.5+

Published:

Just a note to self on how to get (in my case) IntelliJ to spit out all SQL statements happening during unit tests.

  1. Add the following to application.conf
db.default.logSql = true
  1. Add the following to logback.xml
<logger name="org.jdbcdslog.ConnectionLogger" level="OFF"  />
<logger name="org.jdbcdslog.StatementLogger"  level="INFO" />
<logger name="org.jdbcdslog.ResultSetLogger"  level="OFF"  />