SPDLOG_NO_SOURCE_LOC implementation refinement

This commit is contained in:
Nigel Stewart 2022-09-03 12:51:31 +10:00
parent 57e5814364
commit 1eaf98cc10

View File

@ -295,7 +295,7 @@ inline void critical(const T &msg)
#ifndef SPDLOG_NO_SOURCE_LOC
#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
#else
#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{nullptr, 0, nullptr}, level, __VA_ARGS__)
#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{}, level, __VA_ARGS__)
#endif
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE