Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-24510

Fix the duplicate log output of libraries/connectors,when logback is used

    XMLWordPrintableJSON

Details

    Description

      When logback is used, the logs of libraries / connectors are output repeatedly.

       

      By default, appenders are cumulative: a logger will log to the appenders attached to itself (if any) as well as all the appenders attached to its ancestors. Thus, attaching the same appender to multiple loggers will cause logging output to be duplicated.

      http://logback.qos.ch/manual/configuration.html#cumulative

       

      We can solve this problem in the following ways:

      <!-- The following lines keep the log level of common libraries/connectors on
           log level INFO. The root logger does not override this. You have to manually
           change the log levels here. -->
      <logger name="akka" level="INFO"/>
      <logger name="org.apache.kafka" level="INFO"/>
      <logger name="org.apache.hadoop" level="INFO"/>
      <logger name="org.apache.zookeeper" level="INFO"/>
      
      <!-- Suppress the irrelevant (wrong) warnings from the Netty channel handler -->
      <logger name="org.jboss.netty.channel.DefaultChannelPipeline" level="ERROR"/>
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xiangqiao xiangqiao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: