[
https://issues.apache.org/jira/browse/KAFKA-18831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928480#comment-17928480
]
Chia-Ping Tsai commented on KAFKA-18831:
----------------------------------------
After reconsidering the design and reviewing our public APIs, I believe we
should not treat the "logger name" as a namespace in Log4j 2. This would be a
breaking change, as we previously treated the value of BROKER_LOGGER as a
specific logger.
We should use `Configurator.setLevel` instead of `Configurator.setAllLevels` to
fix the issue.
> Document the behavior changes of adjusting logger level after migrating to
> log4j2
> ---------------------------------------------------------------------------------
>
> Key: KAFKA-18831
> URL: https://issues.apache.org/jira/browse/KAFKA-18831
> Project: Kafka
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: TengYao Chi
> Priority: Blocker
> Fix For: 4.0.0
>
>
> There are two behavior changes introduced by log4j 2
> 1)
> in log4j 1, users can't change the logger by parent if the logger is declared
> by properties explicitly. For example, `org.apache.kafka.controller` has
> level explicitly in the properties. Hence, we can't use
> "org.apache.kafka=INFO" to change the level of `org.apache.kafka.controller`
> to INFO. By contrast, log4j2 allows us to change all child loggers by the
> parent logger.
> 2) in log4j2, we can change the level of root to impact all loggers' level.
> By contrast, log4j 1 can't.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)