using if (log.isDebugEnabled()) consistently everywhere