How to make Playframework Evolutions logging more verbose?

笑着哭i 提交于 2019-12-11 06:08:00

问题


I've been trying to see what's going on with them, as I'm facing a problem. When I click the "apply this script" button, the page asking me to apply the script appears again, and it stucks in that loop. It creates the "play_evolutions" table, but no script is run.

The log in the console doesn't give me any relevant info. I've run manually the script and it's ok... So I wan't to know what the real problem is, therefore I need more logging.


回答1:


Evolutions are not very verbose in general (when it talks it mostly does that on warn level).

Basically make sure you have this line at you should get everything play-evolutions produce (it should be in logback.xml file):

<logger name="play.api.db.evolutions" level="DEBUG" />

Full file (as an example only):

<configuration>
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%level %logger{15} - %message%n%xException</pattern>
    </encoder>
  </appender>

  <logger name="play.api.db.evolutions" level="DEBUG" />

  <root level="INFO">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>


来源:https://stackoverflow.com/questions/41291669/how-to-make-playframework-evolutions-logging-more-verbose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!