2

I would like to make sure that all my evolution files are properly run (by my CI agent, which seems to have trouble reading more than one), by logging something like "Applying evolution file 3.sql", or even the whole SQL code that is run to apply the evolutions.

How can make that information appear in the console logs?

I am using play-slick (the loggers might be different?). I tried adding this to the # --- !UPS section

SELECT 'Applying evolution 3.sql' as '';

and also in "application.conf":

slick.dbs.default.db.logSql = true

and different kinds of things in "logback.xml", without success (I could print all my DAO queries, but not the evolutions).

This is the relevant part of my "logback.xml". The Slick one logs only my DAO's queries. The three "jdbcdslog" do nothing, and the Hikari one logs only connections. I have the "play.api.db.evolutions" logger set to DEBUG as in this answer, but it has no effect either.

<!-- Show SQL -->
<logger name="com.zaxxer.hikari" level="OFF">
  <appender-ref ref="STDOUT" />
</logger>
<logger name="org.jdbcdslog.ConnectionLogger" level="DEBUG"  />
<logger name="org.jdbcdslog.StatementLogger"  level="DEBUG" /> 
<logger name="org.jdbcdslog.ResultSetLogger"  level="DEBUG"  /> 

<!-- Slick -->
<logger name="slick.jdbc.JdbcBackend.statement" level="DEBUG" />

<!-- Evolutions -->
<logger name="play.api.db.evolutions" level="DEBUG" />
Community
  • 1
  • 1
JulienD
  • 7,102
  • 9
  • 50
  • 84
  • Show us your `logback.xml` section where you set the logging level for Slick. Try to set the lowest one like `TRACE` to the full package and then refine your configuration. – c4k Mar 08 '17 at 21:26
  • @c4k I added my logback.xml. – JulienD Mar 09 '17 at 08:47
  • 1
    Possible duplicate of [How to make Playframework Evolutions logging more verbose?](http://stackoverflow.com/questions/41291669/how-to-make-playframework-evolutions-logging-more-verbose) – c4k Mar 09 '17 at 15:21
  • 3
    @c4k I also set `` but it does nothing. – JulienD Mar 09 '17 at 16:13

0 Answers0