Flink No appenders could be found for logger

Posted @SmartSi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flink No appenders could be found for logger相关的知识,希望对你有一定的参考价值。

1. 现象

在本地 idea 上运行 Flink 程序时,提示如下告警,同时也不会输出日志:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/wy/.m2/repository/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/wy/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.17.1/log4j-slf4j-impl-2.17.1.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 [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (com.flink.example.table.function.windows.GroupWindowSQLExample).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

2. 解决方案

如报警提示,slf4j 发现了两个桥接器:

以上是关于Flink No appenders could be found for logger的主要内容,如果未能解决你的问题,请参考以下文章

关于控制台输出 警告 log4j:WARN No appenders could be found for logger

log4j:WARN No appenders could be found for logger

解决log4j:WARN No appenders could be found for logger

flume 启动agent报No appenders could be found for logger的解决

crawlerlog4j:WARN No appenders could be found for logger (dao.hsqlmanager).

log4j:WARN No appenders could be found for logger