commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Hohwiller <>
Subject Re: [logging] log4j 1.3 support
Date Mon, 03 Oct 2005 11:17:52 GMT
Hash: SHA1

Jörg Schaible wrote:
> Simon Kitching wrote:
Hi there,
> [snip]
>>In Log4J1.2, Level extends Priority and Logger extends Category.
>>The log method on Category only takes Priority parameters.
>>So any calls to the log method resolves to a method on a Category
>>instance that takes a Priority parameter, even when the source code is
>>invoking the method on a reference of type Logger and passing a
>>parameter of type Level. [1]
>>In Log4J1.3, Priority extends Level, and all the constants on the
>>Priority class are actually of type Level.
>>The result is that no code compiled against 1.2 will run with 1.3 at
>>runtime. And that no code compiled against 1.3 will run with 1.2 at
>>If you *can* find a way to write one logger class that (compiled against
>>either version) will run against both libs that would be great - but
>>please *test* that after compiling your code (against either library) it
>>works at runtime with either lib version in the classpath. I've spent
>>some time thinking about this and believe it can't be done.
> [snip]
> You can do something like this with reflection, but this might impact the
> performance and has consequences for secure environments :(
I can not see all your guyz problems. I replaced Priority with Level and removed
the "isAsignableFrom" section and everyting works and compiles fine. Even the
TRACE is defined in Level and Priority so there is not even reflection magic
Am I missing something??? Maybe I should get the 1.3 alpha release and have a
look if I can find the problem Simon was talking about...
The tests all worked excellent with 1.2.12 and Log4j12Logger works fine with
prior versions. And as I said that is how the log4j guyz told to do it a long
time ago. I did not check this with log4j versions prior than 1.2.6. But as I
pointed out earlier, the Log4J12Logger is using the log4j type "Logger" anyways
and that came together with the type "Level".
Maybe we do not even need two Log4j Loggers - what do you think?
> - Jörg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message