使用-Dlogback.debug=true
正如託尼在評論中所述。 那麼這表明了:
15:14:22,155 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
15:14:22,156 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/.../target/test-classes/logback-test.xml]
15:14:22,333 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
15:14:22,338 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [consoleAppender]
15:14:22,354 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
15:14:22,378 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.optaplanner] to INFO
15:14:22,379 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
15:14:22,379 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT]
15:14:22,379 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
15:14:22,380 |-INFO in [email protected] - Registering current configuration as safe fallback point
從中明確此行重要的:
... - Found resource [logback-test.xml] at [file:/.../target/test-classes/logback-test.xml]
如果沒有顯示出來,它或者使用默認的日誌配置(一切DEBUG)或無法識別的系統屬性。祝你好運算出它是哪種情況(vote for this jira)。
嘗試使用'-Dlogback.debug = true'運行您的應用程序http://stackoverflow.com/questions/3802054/run-logback-in-debug – tony19