mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 14:42:13 +08:00
Fix unexpected log macro expansion
This commit is contained in:
parent
7bf8f14879
commit
d366a06461
@ -327,8 +327,10 @@ inline void critical(const wchar_t *fmt, const Args &... args)
|
|||||||
//
|
//
|
||||||
|
|
||||||
#define SPDLOG_LOGGER_CALL(logger, level, ...) \
|
#define SPDLOG_LOGGER_CALL(logger, level, ...) \
|
||||||
if (logger->should_log(level)) \
|
do { \
|
||||||
logger->log(spdlog::source_loc{SPDLOG_FILE_BASENAME(__FILE__), __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
|
if (logger->should_log(level)) \
|
||||||
|
logger->log(spdlog::source_loc{SPDLOG_FILE_BASENAME(__FILE__), __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__) \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
|
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
|
||||||
#define SPDLOG_LOGGER_TRACE(logger, ...) SPDLOG_LOGGER_CALL(logger, spdlog::level::trace, __VA_ARGS__)
|
#define SPDLOG_LOGGER_TRACE(logger, ...) SPDLOG_LOGGER_CALL(logger, spdlog::level::trace, __VA_ARGS__)
|
||||||
|
Loading…
Reference in New Issue
Block a user