You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Luke Hutchison (JIRA)" <ji...@apache.org> on 2018/06/01 05:36:00 UTC

[jira] [Commented] (FLINK-6019) Some log4j messages do not have a loglevel field set, so they can't be suppressed

    [ https://issues.apache.org/jira/browse/FLINK-6019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497586#comment-16497586 ] 

Luke Hutchison commented on FLINK-6019:
---------------------------------------

[~StephanEwen] I updated to Flink 1.5 and log4j2, and I am seeing this problem again. Now {{env.getConfig().disableSysoutLogging()}} no longer suppresses output from Flink.

I have log4j2 configured using {{src/main/resources/log4j2.xml}}, and logging works correctly for my own log output in my program. However, Flink does not reuse the same log4j logger. I have even tried adding a {{log4j.properties}} file in the same directory, in case Flink needs configuration in the older format, but that does not help.

Log output from my own logging commands appears on stdout, and log output from Flink appears on stderr, with a different log line format. So it is clear that Flink is starting up its own instance of log4j.

How do I get Flink to simply use the log4j instance that I have included on the classpath?

> Some log4j messages do not have a loglevel field set, so they can't be suppressed
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-6019
>                 URL: https://issues.apache.org/jira/browse/FLINK-6019
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0
>         Environment: Linux
>            Reporter: Luke Hutchison
>            Priority: Major
>
> Some of the log messages do not appear to have a loglevel value set, so they can't be suppressed by setting the log4j level to WARN. There's this line at the beginning which doesn't even have a timestamp:
> {noformat}
> Connected to JobManager at Actor[akka://flink/user/jobmanager_1#1844933939]
> {noformat}
> And then there are numerous lines like this, missing an "INFO" field:
> {noformat}
> 03/10/2017 00:01:14	Job execution switched to status RUNNING.
> 03/10/2017 00:01:14	DataSource (at readTable(DBTableReader.java:165) (org.apache.flink.api.java.io.PojoCsvInputFormat))(1/8) switched to SCHEDULED 
> 03/10/2017 00:01:14	DataSink (count())(1/8) switched to SCHEDULED 
> 03/10/2017 00:01:14	DataSink (count())(3/8) switched to DEPLOYING 
> 03/10/2017 00:01:15	DataSink (count())(3/8) switched to RUNNING 
> 03/10/2017 00:01:17	DataSink (count())(6/8) switched to FINISHED 
> 03/10/2017 00:01:17	DataSource (at readTable(DBTableReader.java:165) (org.apache.flink.api.java.io.PojoCsvInputFormat))(6/8) switched to FINISHED 
> 03/10/2017 00:01:17	Job execution switched to status FINISHED.
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)