[Hawkular-dev] Logging ...

Heiko W.Rupp hrupp at redhat.com
Wed Jan 28 07:47:41 EST 2015


> Am 28.01.2015 um 12:57 schrieb Lucas Ponce <lponce at redhat.com>:
> Also, this point can be discussed later, but is there any convention for debug, like this one: 
> 
>        if (LOG.isDebugEnabled()) {
>            LOG.debug("Message received: [{}]", msg);
>        }
> 
> I mean, I like to use DEBUG for verbosity, but to reduce performance penalty, we can discuss a common approach.

Isn't that relatively common usage anyway?
Seriously - if some code has dozens of ifDebugEnabled() calls, it may make
a lot of sense to factor that out to the start of the method or even in to the constructor
so that this goes    if (isDebug) ... { log.debug() } 

Or do you mean the usage of the ugly uppercase LOG variable :-)?


More information about the hawkular-dev mailing list