[Hawkular-dev] Logging ...
Lucas Ponce
lponce at redhat.com
Wed Jan 28 08:33:09 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() }
+1
>
> Or do you mean the usage of the ugly uppercase LOG variable :-)?
I don't have any preference ussing log, _log, LOG, or whatever :-) just asking what is the preferred nomenclature, or if these things are in some doc that probably I missed.
Thx.
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
More information about the hawkular-dev
mailing list