<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 25.04.2010, at 09:44, 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; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span"><br></font></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></div></blockquote><br></div><div><div>Thanks - actually I'd prefer your way, it seems more natural, but I could do this way without needing a change.</div></div></div></blockquote><div><br></div><div>I'd also appreciate an extended Logger interface containing those log-methods, but only while switching to Java 1.5.</div><div>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.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>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.</div><div><br></div></div></div></blockquote><div><br></div><div>It would perform better if you performed the method lookups in the c'tor, keeping references to the Method objects.</div><div>I wouldn't use reflection here, though, just because every bit of performance is relevant in case of logging.</div><div><br></div><div>Cheers,</div><div>Joern.</div></div></body></html>