我有一个客户机使用log4j和以下pom.xml
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>kinesis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
当我调用:new defaultawsregionproviderchain()(由kinesis dependency提供)时,我得到以下错误:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
一种可能的解决方案是强制lo4j2使用slf4j实现,即。
<!-- I DONT WANT TO USE log4j-slf4j-impl -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
但是我不想使用slf4j,我想使用本地log4j实现。那么我怎样才能摆脱那些错误日志呢?
暂无答案!
目前还没有任何答案,快来回答吧!