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

Joern Huxhorn jhuxhorn at googlemail.com
Sat Apr 24 23:41:07 CEST 2010


On 24.04.2010, at 23:09, Robert Elliot wrote:

> 
> On 24 Apr 2010, at 21:05, Joern Huxhorn wrote:
>> 
>> I have one remaining headache:
>> I'd really, really like to have generic methods that log with a Level parameter.
>> This would be an ideal place for an enum but we are still staying 1.4 for now, right?
>> If we are not using an enum now, we won't be able to switch to an enum at a later time without breaking binary compatibility.
>> Because of that, I'd suggest to keep those generic log methods out of the interface until we actually switch to 1.5 altogether - even though I have several places where I could use that functionality very well!
> 
> I needed exactly this for the sysout-over-slf4j module that I'm hoping will be included as an SLF4J bridging module.  Ceki told me that it was acceptable for an extension module to require Java 5.  I've written an implementation here:
> http://github.com/Mahoney/slf4j/blob/master/sysout-over-slf4j/src/main/java/org/slf4j/sysoutslf4j/context/LogLevel.java
> 
> Nothing very brilliant, you've probably written it yourself already.  And it only does the two methods I needed.  Still, thought it might be worth mentioning.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20100424/b7dc3219/attachment.html>


More information about the slf4j-dev mailing list