mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
Added TRACE_IF and DEBUG_IF macro definitions when TRACE_ON and DEBUG_ON aren't defined
This commit is contained in:
parent
b75da32f4d
commit
13a938fc7f
@ -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__)
|
#define SPDLOG_TRACE_IF(logger, flag, ...) logger->trace_if(flag, "[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define SPDLOG_TRACE(logger, ...)
|
#define SPDLOG_TRACE(logger, ...)
|
||||||
|
#define SPDLOG_TRACE_IF(logger, flag, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPDLOG_DEBUG_ON
|
#ifdef SPDLOG_DEBUG_ON
|
||||||
@ -179,6 +180,7 @@ void drop_all();
|
|||||||
#define SPDLOG_DEBUG_IF(logger, flag, ...) logger->debug_if(flag, __VA_ARGS__)
|
#define SPDLOG_DEBUG_IF(logger, flag, ...) logger->debug_if(flag, __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define SPDLOG_DEBUG(logger, ...)
|
#define SPDLOG_DEBUG(logger, ...)
|
||||||
|
#define SPDLOG_DEBUG_IF(logger, flag, ...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user