Fix the condition check after adding "if (logger.isDebugEnabled())"