WARN No appenders could be found for logger (org.apache.flink.api.java.ClosureCleaner)

刘超 15天前 ⋅ 851 阅读   编辑

一、描述

  执行flink程序,报WARN No appenders could be found for logger (org.apache.flink.api.java.ClosureCleaner)

二、解决方法

  在resource中,添加log4j.properties,文件内容如下

log4j.rootLogger=warn, console

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n

  如果还是不行,在代码中添加org.apache.log4j.BasicConfigurator.configure();即可


注意:本文归作者所有,未经作者允许,不得转载

全部评论: 0

    我有话说: