问题
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