mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
Refactoring to better support backtrace
This commit is contained in:
@@ -285,12 +285,8 @@ inline void critical(wstring_view_t fmt, const Args &... args)
|
||||
// SPDLOG_LEVEL_OFF
|
||||
//
|
||||
|
||||
#define SPDLOG_LOGGER_CALL(logger, level, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (logger->should_log(level)) \
|
||||
logger->force_log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__); \
|
||||
} while (0)
|
||||
#define SPDLOG_LOGGER_CALL(logger, level, ...)\
|
||||
logger->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__); \
|
||||
|
||||
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
|
||||
#define SPDLOG_LOGGER_TRACE(logger, ...) SPDLOG_LOGGER_CALL(logger, spdlog::level::trace, __VA_ARGS__)
|
||||
|
Reference in New Issue
Block a user