将项目中的springboot升级到3.0.7版本并将java升级到17后,开始出现以下错误,尽管项目在升级之前工作正常。
Logging system failed to initialize using configuration from 'null'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.action.AppenderAction - Missing attribute [name] in element [appender] near line 43
ERROR in ch.qos.logback.classic.AsyncAppender[LOGSTASH] - No attached appenders found.
我尝试了多种方法来包含和排除 slf4j/log4j 依赖项,但问题仍然存在。
我也有同样的问题。要解决该问题,只需在 resources/logback.xml 中为您的附加程序设置“名称”标签即可。 (第 43 行)可能有类似的东西
<appender class="...">
我仍然不明白 Spring 和 Logback 到底发生了什么变化,使得名称成为必需的