This seems like a nice clean up that will break a lot of configurations. How about we issue a warning in 2.x like "The logger name 'root' is deprecated and will be removed in 3.0"?
Gary On Tue, Nov 19, 2024, 7:01 AM Piotr P. Karwasz <pi...@mailing.copernik.eu> wrote: > Hi all, > > In Log4j Core 2 there is a residual support for a logger named "root", > e.g.: > > <Logger name="root" level="INFO"/> > > has the same effect as: > > <Root level="INFO"/> > > However `Configurator.setLevel()`, `Configuration.getLoggerConfig()` and > other methods don't support the `root` alias. Should we introduce > support for `root` to those methods or rather remove (in Log4j Core 3) > the residual support in the `LoggerConfig` class? > > Note that being able to refer to the root logger configuration via a > non-empty string has its advantage: Kafka uses it for a REST API that > allows users to modify the configured log levels. > > Piotr > > [1] > > https://github.com/apache/kafka/blob/efaab5132b71e2566cfb4e4644d6245f261f49d0/core/src/main/scala/kafka/utils/Log4jController.scala > >