当前位置:   article > 正文

logback: java.lang.IllegalStateException: Logback configuration error detected:

java.lang.illegalstateexception: logback configuration error detected: error

先给出错误的代码代码及图片:

Logging system failed to initialize using configuration from 'classpath:logback.xml'
java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration 
  • 1
  • 2
  • 3

在这里插入图片描述
其实解决办法就在控制台报出的日志里的蓝色url里面,打开url进行查看
它自动跳转到了这里
在这里插入图片描述
翻译一下:
在这里插入图片描述
简单说,我在logback.xml文件中使用了没有定义的appender标签,查看我的logback.xml配置文件
在这里插入图片描述
确实,上面定义为FILE的appender已经注释掉了,但下面依旧使用了,才会报出这样的错误,将下面的注释掉即可解决

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/312803
推荐阅读
相关标签
  

闽ICP备14008679号