From 13a938fc7faf4a072ede259bea989337608c71d9 Mon Sep 17 00:00:00 2001 From: Matt Crane Date: Sat, 22 Jul 2017 21:42:20 -0400 Subject: [PATCH] Added TRACE_IF and DEBUG_IF macro definitions when TRACE_ON and DEBUG_ON aren't defined --- include/spdlog/spdlog.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index fb4ea59e..5da20621 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -172,6 +172,7 @@ void drop_all(); #define SPDLOG_TRACE_IF(logger, flag, ...) logger->trace_if(flag, "[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__) #else #define SPDLOG_TRACE(logger, ...) +#define SPDLOG_TRACE_IF(logger, flag, ...) #endif #ifdef SPDLOG_DEBUG_ON @@ -179,6 +180,7 @@ void drop_all(); #define SPDLOG_DEBUG_IF(logger, flag, ...) logger->debug_if(flag, __VA_ARGS__) #else #define SPDLOG_DEBUG(logger, ...) +#define SPDLOG_DEBUG_IF(logger, flag, ...) #endif }