<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 24.04.2010, at 23:09, Robert Elliot wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 24 Apr 2010, at 21:05, Joern Huxhorn wrote:</div><blockquote type="cite"><div><font class="Apple-style-span"><br></font>I have one remaining headache:<br>I'd really, really like to have generic methods that log with a Level parameter.<br>This would be an ideal place for an enum but we are still staying 1.4 for now, right?<br>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.<br>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!<br></div></blockquote></div><br><div>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:</div><div><a href="http://github.com/Mahoney/slf4j/blob/master/sysout-over-slf4j/src/main/java/org/slf4j/sysoutslf4j/context/LogLevel.java">http://github.com/Mahoney/slf4j/blob/master/sysout-over-slf4j/src/main/java/org/slf4j/sysoutslf4j/context/LogLevel.java</a></div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>I've just taken a look at your code and I think it's quite neat.</div><div>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.</div><div>This leaves the Logger interface alone, which is nice.</div><div>It should be extended by the various other methods, including isEnabled(Logger)/isEnabled(Logger, Marker), though - as you said.</div><div><br></div>Thanks for letting me know,</div><div>Joern.</div></body></html>