码迷,mamicode.com
首页 > 其他好文 > 详细

禁止logback输出状态信息

时间:2017-12-01 23:38:06      阅读:628      评论:0      收藏:0      [点我收藏+]

标签:art   file   listener   logger   overflow   监听   监听器   spi   debug   

一、问题描述

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>

将状态信息监听器设置为无操作监听器。

参考资料

stackoverflow

禁止logback输出状态信息

标签:art   file   listener   logger   overflow   监听   监听器   spi   debug   

原文地址:http://www.cnblogs.com/weidiao/p/7944676.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!