[JAVA] Failed to load class “org.slf4j.impl.StaticLoggerBinder” 问题解决

2020-03-15

平时我们在对Flink应用进行本地调试启动的时候,经常会遇到日志打印出现类似情况

1
2
3
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.

我们只需要在POM文件增加,就可以解决

1
2
3
4
5
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.21</version>
</dependency>