[slf4j-dev] [PATCH] allow passing of objects through jcl-over-slf4j

Robert Varga varga at pantheon.sk
Tue Sep 30 13:39:46 CEST 2008


Ceki Gulcu wrote:
> Hello Robert,

Hi,

> Even if it solved your specific problem, your patch would complicate 
> jcl-over-slf4j's code for everyone else. Moreover, the SLF4JLocationAwareLogger 
> class also converts objects into strings, meaning that the same type of test 
> would need to be propagated to that class as well.

Oh, I missed that one. I agree that this poses additional overhead which 
is completely unnecessary for the common case. Maybe this could be 
resolved by providing two additional loggers and teaching 
SLF4JLogFactory to select the appropriate one (based on a property 
perhaps)? The default code path could remain unaltered with the 
exception of one check in SLF4JLogFactory.getInstance() slow-path.

>  From what I could gather, by migration, you mean replacing commons-logging.jar 
> with jcl-over-slf4j.jar, right? Presumably, you log with metadata in your own 
> code (as in, code you control).

Yes.

> Have you considered invoking the SLF4J API directly?

Yes, that would be the long-term goal. Unfortunately the amount of code 
(~700KLOC) requires a gradual transition in which both APIs will work 
concurrently producing the same output.

Bye,
Robert



More information about the slf4j-dev mailing list