Adding a logDebug method that will check if debug logging is enabled before formatting the string.