Hi all,
I've noticed a pattern in Geode where we wrap a log call in a check at the
same level, such as:
if (logger.isDebugEnabled()) {
logger.debug("cleaning up incompletely started
DistributionManager due to exception", r);
}
Is there any reason to do this? To my mind, it's an extra conditional that
should essentially be the first check inside `logger.debug(...)` anyways,
and it complicates the code and makes it less readable. I've even seen
places in the code which have `if (logger.isDebugEnabled())
logger.trace(...))` and such.
I would like to propose that unless there is a compelling reason to use
this pattern, we remove all extra checks entirely.
Galen