[slf4j-dev] Release of SLF4J version 1.6.0-RC0

Joern Huxhorn jhuxhorn at googlemail.com
Sun Apr 25 14:24:54 CEST 2010


On 25.04.2010, at 09:44, Robert Elliot wrote:

>> 
>> I've just taken a look at your code and I think it's quite neat.
>> I've implemented it the other way around (i.e. a log-methods that receive a dumb Level enum) but I kind of like your idea of putting the log-methods into the enum instead.
>> This leaves the Logger interface alone, which is nice.
>> It should be extended by the various other methods, including isEnabled(Logger)/isEnabled(Logger, Marker), though - as you said.
>> 
>> Thanks for letting me know,
>> Joern.
> 
> Thanks - actually I'd prefer your way, it seems more natural, but I could do this way without needing a change.

I'd also appreciate an extended Logger interface containing those log-methods, but only while switching to Java 1.5.
This doesn't mean that the enum shouldn't be built like you suggested. Having both ways of logging would probably be nice, but I'm a bit torn here.

> 
> I've just tidied it up using reflection to make it much easier to add the missing methods, though probably at a small performance cost.
> 

It would perform better if you performed the method lookups in the c'tor, keeping references to the Method objects.
I wouldn't use reflection here, though, just because every bit of performance is relevant in case of logging.

Cheers,
Joern.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20100425/0bb6daa5/attachment-0001.html>


More information about the slf4j-dev mailing list