[ 
https://issues.apache.org/jira/browse/KAFKA-18243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai updated KAFKA-18243:
-----------------------------------
    Summary: Loggers breaks the use of root logger after migrating to log4j2  
(was: Loggers#loggers should not add rootLogger again.)

> Loggers breaks the use of root logger after migrating to log4j2
> ---------------------------------------------------------------
>
>                 Key: KAFKA-18243
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18243
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: TengYao Chi
>            Assignee: TengYao Chi
>            Priority: Blocker
>             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