[
https://issues.apache.org/jira/browse/FLINK-18284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17134833#comment-17134833
]
appleyuchi edited comment on FLINK-18284 at 6/14/20, 1:57 AM:
--------------------------------------------------------------
release-1.11.0-rc1
For Flink 1.10.1
①$FLINK_HOME/conf remain flink-conf.yaml,delete other files.
②$FLINK_HOME/bin delete start-scala-shell.sh
from release-1.11.0-rc1
③git clone [http://github.com/flink](release-1.11.0-rc1)
④cd flink-dist/src/main/flink-bin/conf(release-1.11.0-rc1)
⑤cp * $FLINK_HOME/conf(from release-1.11.0-rc1 to local 1.10.1)
⑥cp flink-scala-shell/start-script/start-scala-shell.sh $FLINK_HOME/bin(from
release-1.11.0-rc1 to local 1.10.1)
Test:
⑦$FLINK_HOME/bin/start-scala-shell.sh local(warning remains)
log4j:WARN No appenders could be found for logger
(org.apache.flink.configuration.GlobalConfiguration).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See [http://logging.apache.org/log4j/1.2/faq.html#noconfig] for
more info.
Modification:
add to log4j.properties
log4j.rootLogger=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d\{dd/MM/yyyy HH:mm:ss.SSS}
%5p [%-10c] %m%n
Reference:
[https://riptutorial.com/apache-flink/example/29954/logging-configuration]
was (Author: appleyuchi):
以下步骤验证github上面的Flink最新版本(我也不知道最新版本号是啥,下面以1.11代称)到底修复这个warning没。
先操作1.10.1版本:
①$FLINK_HOME保留flink-conf.yaml,其余配置文件全部删除。
②删除$FLINK_HOME/bin下面的start-scala-shell.sh
借用最新版本的文件:
③git clone [http://github.com/flink](这里是1.11版本)
④cd flink-dist/src/main/flink-bin/conf(这里是1.11版本)
⑤cp * $FLINK_HOME/conf(1.11版本的配置文件拷贝给1.10.1版本)
⑥cp flink-scala-shell/start-script/start-scala-shell.sh
$FLINK_HOME/bin(1.11版本的启动脚本拷贝给1.10.1版本)
测试:
⑦$FLINK_HOME/bin/start-scala-shell.sh local(警告依旧)
log4j:WARN No appenders could be found for logger
(org.apache.flink.configuration.GlobalConfiguration).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See [http://logging.apache.org/log4j/1.2/faq.html#noconfig] for
more info.
解决方案:
在log4j.properties文件末尾加入以下几行
log4j.rootLogger=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d\{dd/MM/yyyy HH:mm:ss.SSS}
%5p [%-10c] %m%n
Reference:
[https://riptutorial.com/apache-flink/example/29954/logging-configuration]
> No appenders could be found for logger
> ---------------------------------------
>
> Key: FLINK-18284
> URL: https://issues.apache.org/jira/browse/FLINK-18284
> Project: Flink
> Issue Type: Bug
> Affects Versions: 1.11.1
> Reporter: appleyuchi
> Priority: Major
>
> start-scala-shell.sh local
> Starting Flink Shell:
> log4j:WARN No appenders could be found for logger
> (org.apache.flink.configuration.GlobalConfiguration).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
> info.
>
> what's the configuration to fix this warning,it's annoying.
> PS:
> configuration in log4j.properties did not work.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)