将springboot和java升级到最新版本后出现logback错误

问题描述 投票:0回答:1

将项目中的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 依赖项,但问题仍然存在。

java spring-boot logback slf4j
1个回答
0
投票

我也有同样的问题。要解决该问题,只需在 resources/logback.xml 中为您的附加程序设置“名称”标签即可。 (第 43 行)可能有类似的东西

<appender class="...">

我仍然不明白 Spring 和 Logback 到底发生了什么变化,使得名称成为必需的

© www.soinside.com 2019 - 2024. All rights reserved.