如何使Playframework Evolutions日志记录更加冗长? [英] How to make Playframework Evolutions logging more verbose?
问题描述
由于遇到问题,我一直在尝试查看它们的运行情况. 当我单击应用此脚本"按钮时,再次出现要求我应用该脚本的页面,并且卡在了该循环中.它会创建"play_evolutions"表,但不会运行任何脚本.
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.
推荐答案
进化通常不是很冗长(当talks
时,它大多在警告级别进行).
Evolutions are not very verbose in general (when it talks
it mostly does that on warn level).
基本上要确保您有这行内容,才能获取播放进化产生的所有内容(应该在logback.xml
文件中):
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>
这篇关于如何使Playframework Evolutions日志记录更加冗长?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!