一、问题描述
22:18:07,299 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
22:18:07,299 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
22:18:07,299 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/C:/Users/weidiao/Desktop/cnblog.jar!/logback.xml]
22:18:07,315 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@22f71333 - URL [jar:file:/C:/Users/weidiao/Desktop/cnblog.jar!/logback.xml] is not of type file
22:18:07,366 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
22:18:07,366 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Will scan for changes in [jar:file:/C:/Users/weidiao/Desktop/cnblog.jar!/logback.xml]
22:18:07,366 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeTask scanning period to 10 seconds
logback启动时,会打印它检查了哪些配置、看见了哪些配置,这些信息有时是必须关掉的。
二、解决方法
<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<!-- etc -->
</configuration>
将状态信息监听器设置为无操作监听器。