【发布时间】:2018-09-20 12:00:14
【问题描述】:
我正在尝试使用 scala-g8 模板使用 logback.xml 设置基本日志记录。我遇到的问题是,出于某种原因,Play 框架一直在使用 .ivy2 缓存文件夹中的 logback 文件。我的conf 目录中有一个logback.xml,但它似乎没有收到它。有任何想法吗?这是日志:
14:36:06,949 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [jar:file:/home/julian/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.5.jar!/logback-test.xml]
14:36:06,961 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@4aeb1d4e - URL [jar:file:/home/julian/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.5.jar!/logback-test.xml] is not of type file
14:36:07,060 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.NopStatusListener]
14:36:07,061 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
14:36:07,068 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
14:36:07,073 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
14:36:07,094 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
14:36:07,094 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
14:36:07,095 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
14:36:07,095 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6d63c1fd - Registering current configuration as safe fallback point
14:36:06,949 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [jar:file:/home/julian/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.5.jar!/logback-test.xml]
14:36:06,961 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@4aeb1d4e - URL [jar:file:/home/julian/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.5.jar!/logback-test.xml] is not of type file
14:36:07,060 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.NopStatusListener]
14:36:07,061 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
14:36:07,068 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
14:36:07,073 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
14:36:07,094 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
14:36:07,094 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
14:36:07,095 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
14:36:07,095 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6d63c1fd - Registering current configuration as safe fallback point
14:36:07,167 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@77ece54e - URL [jar:file:/home/julian/.ivy2/cache/com.typesafe.play/play-openid_2.12/jars/play-openid_2.12-2.6.5.jar!/logback-test.xml] is not of type file
14:36:07,169 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.NopStatusListener]
14:36:07,169 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
14:36:07,169 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
14:36:07,169 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
14:36:07,169 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
14:36:07,169 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
14:36:07,170 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
14:36:07,170 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@5aaa6c89 - Registering current configuration as safe fallback point
这真的很奇怪,因为这是开箱即用的模板。谢谢!
【问题讨论】:
标签: scala playframework logback