[slf4j-user] Expressions on log statements to avoid log guading

Chris Pratt thechrispratt at gmail.com
Thu Sep 12 17:20:21 CEST 2013


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?
  (*Chris*)


On Thu, Sep 12, 2013 at 12:27 AM, coldserenity <rmuntyan at softserveinc.com>wrote:

> At first glance this is indeed a cool feature allowing to remove large
> amount
> of isSomethingEnabled code, this also brings a HUGE threat: you don't have
> compile-time check any more.
>
> And when at some time having a production issue, you enable your DEBUG
> logs,
> instead of solving the original issue you might get another one: logs
> floated with NoSuchMethodException.
>
> Without at least proper IDE support, I'd rather not use it.
>
>
>
> --
> View this message in context:
> http://slf4j.42922.n3.nabble.com/Expressions-on-log-statements-to-avoid-log-guading-tp4025601p4025604.html
> Sent from the slf4j - user mailing list archive at Nabble.com.
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20130912/21947208/attachment.html>


More information about the slf4j-user mailing list