Closed
Description
The main difference between the core.Logger#setLevel
method and Configurator#setLevel
is that the former changes only the level of a specific logger, while the latter also changes the level of child loggers.
As documented in its Javadoc, the core.Logger#setLevel
method is not part of the public API (so it can do whatever it wants). However it is used in log4j-1.2-api
and log4j-jul
instead of the more correct Configurator#setLevel
method and it causes those modules to misbehave.
We can therefore:
- either change the way
Logger#setLevel
works to match the behavior ofConfigurator#setLevel
(IMHO it is the best option, since it prevents mistakes from committers and users), - or simply replace
Logger#setLevel
withConfigurator#setLevel
inlog4j-1.2-api
andlog4j-jul
.