Skip to content

Commit

Permalink
Only keep HBLogDebug logs on 'DEBUG' builds (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrazeiOS authored Aug 10, 2024
1 parent ec8b9a0 commit 8194da1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HBLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit 8194da1

Please sign in to comment.