Tag Archives: JDBC

Enable SQL logging in Play 2.5+

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
  2. 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"  />

Source: StackOverflow