【发布时间】:2021-02-10 03:50:52
【问题描述】:
在其他答案之后,我确实排除了这个,但我开始收到 ERROR An exception occurred processing Appender http java.lang.IllegalArgumentException:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
我需要修复 SLF4J 绑定,因为它会阻止我的日志转到 Splunk:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/app.jar!/BOOT-INF/lib/logback-classic-
1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/app.jar!/BOOT-INF/lib/log4j-slf4j-impl-
2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
【问题讨论】:
标签: java logging log4j slf4j splunk