From 8194da11cbd5621eb3cf77930e5c3a71b3a74565 Mon Sep 17 00:00:00 2001 From: iCraze <39101269+iCrazeiOS@users.noreply.github.com> Date: Sat, 10 Aug 2024 16:51:40 +0100 Subject: [PATCH] Only keep HBLogDebug logs on 'DEBUG' builds (#96) --- HBLog.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HBLog.h b/HBLog.h index 6358007..05809bd 100644 --- a/HBLog.h +++ b/HBLog.h @@ -13,7 +13,11 @@ #define HB_LOG_INTERNAL(level, type, ...) os_log_with_type(OS_LOG_DEFAULT, level, "[%{public}s:%{public}d] %{public}@", __BASE_FILE__, __LINE__, [NSString stringWithFormat:__VA_ARGS__]) - #define HBLogDebug(...) HB_LOG_INTERNAL(OS_LOG_TYPE_DEBUG, "DEBUG", __VA_ARGS__) + #ifdef __DEBUG__ + #define HBLogDebug(...) HB_LOG_INTERNAL(OS_LOG_TYPE_DEBUG, "DEBUG", __VA_ARGS__) + #else + #define HBLogDebug(...) + #endif #define HBLogInfo(...) HB_LOG_INTERNAL(OS_LOG_TYPE_INFO, "INFO", __VA_ARGS__) #define HBLogWarn(...) HB_LOG_INTERNAL(OS_LOG_TYPE_DEFAULT, "WARN", __VA_ARGS__) #define HBLogError(...) HB_LOG_INTERNAL(OS_LOG_TYPE_ERROR, "ERROR", __VA_ARGS__)