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.
_______________________________________________
slf4j-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/slf4j-dev

Reply via email to