log only if debug logging is enabled