TengYao Chi created KAFKA-18243:
-----------------------------------

             Summary: Loggers#loggers should not add rootLogger again.
                 Key: KAFKA-18243
                 URL: https://issues.apache.org/jira/browse/KAFKA-18243
             Project: Kafka
          Issue Type: Bug
            Reporter: TengYao Chi
            Assignee: TengYao Chi
             Fix For: 4.0.0


In log4j1, the {{LogManager#getCurrentLoggers}} method returns all loggers 
except for the root logger. Therefore, in the 
{{org.apache.kafka.connect.runtime.Loggers#loggers}} method, the root logger 
needs to be manually added back to the returned result.

However, in the new log4j2, the {{getCurrentLoggers}} method no longer exists. 
Instead, the {{LoggerContext.getConfiguration().getLoggers()}} method is used, 
which returns all loggers, including the root logger. As a result, following 
the current logic in the {{org.apache.kafka.connect.runtime.Loggers#loggers}} 
method would result in a collection containing two root loggers.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to