logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache <ralph.go...@dslextreme.com>
Subject Re: Switching log levels at runtime with log4j2
Date Tue, 29 Nov 2016 15:48:23 GMT

> On Nov 29, 2016, at 8:20 AM, Jochen Wiedmann <jochen.wiedmann@gmail.com> wrote:
> On Mon, Nov 28, 2016 at 9:58 PM, Gary Gregory <garydgregory@gmail.com> wrote:
>> Does this help:
>> https://garygregory.wordpress.com/2016/01/11/changing-log-levels-in-log4j2/
> Hi, Gary,
> considering what's all in Configurator nowadays, I wonder, whether one
> could also add a small compatibility layer for log4j, say
> BasicConfigurator, ProperrtyConfigurator, and DOMConfigurator? I am
> aware, this has been rejected in the past, but I am sure, that the
> required changes would have been different at the time.

Most of the methods in DOMConfigurator require a LoggerRepository. While the interface is
present in the Log4j 1.2 adapter, it isn’t really implemented anywhere as it was replaced
by the LoggerContext in Log4j 2 and implementing something to emulate it would be somewhat
problematic due to how Loggers and their configuration are separate in Log4j 2. Furthermore,
the methods that accept configuration would be assuming a Log4j 1.x configuration. I don’t
believe the support for that is implemented yet. 

PropertyConfigurator would also require a LoggerRepository. It also requires Log4j 1.x format
configuration files. Support for that is not fully implemented yet.

BasicConfigurator only has 3 methods, one of which is implemented. configure(Appender appender)
requires a Log4j 1.x Appender, which Log4j 2 doesn’t currently support. resetConfiguration()
could be easily implemented.


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message