<div dir="ltr">Oh, I just figured out where you think the NoSuchMethodExceptions will come from, the message format strings.  No, you should never get any exceptions from the Log package, they are caught and quietly ignored.  The placeholders that they refer to will be empty and your program will continue without any interruption.  For me, and many I work with, the possibility that a method will have been renamed while we weren't looking is a lot less important than the performance of our product when the logs are turned down.  It's a trade off for sure, but one many are willing to make.<div>

  (*Chris*)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 8:20 AM, Chris Pratt <span dir="ltr"><<a href="mailto:thechrispratt@gmail.com" target="_blank">thechrispratt@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hmmm, I'm not sure I follow you...  isDebugEnabled() is not a compile-time check, it's a run-time check, and in fact, is the first thing that Anodyzed's Log.debug() method does.  It's efficiency comes from the fact that Java doesn't have to assemble the log message that will be thrown away every time that isDebugEnabled() returns false.  I'm not sure where the NoSuchMethodExceptions are coming from in your example?<span class="HOEnZb"><font color="#888888"><div>


  (*Chris*)</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 12:27 AM, coldserenity <span dir="ltr"><<a href="mailto:rmuntyan@softserveinc.com" target="_blank">rmuntyan@softserveinc.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At first glance this is indeed a cool feature allowing to remove large amount<br>
of isSomethingEnabled code, this also brings a HUGE threat: you don't have<br>
compile-time check any more.<br>
<br>
And when at some time having a production issue, you enable your DEBUG logs,<br>
instead of solving the original issue you might get another one: logs<br>
floated with NoSuchMethodException.<br>
<br>
Without at least proper IDE support, I'd rather not use it.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://slf4j.42922.n3.nabble.com/Expressions-on-log-statements-to-avoid-log-guading-tp4025601p4025604.html" target="_blank">http://slf4j.42922.n3.nabble.com/Expressions-on-log-statements-to-avoid-log-guading-tp4025601p4025604.html</a><br>



Sent from the slf4j - user mailing list archive at Nabble.com.<br>
<div><div>_______________________________________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>