From 3c57133c7a9b56604da558cf7977fffa0e9aa6d5 Mon Sep 17 00:00:00 2001 From: gabi Date: Fri, 26 Dec 2014 00:44:45 +0200 Subject: [PATCH] Fixed bug #26 (SPDLOG_TRACE macro does not work as expected) --- include/spdlog/spdlog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index ec8e4717..68ccb836 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -126,14 +126,14 @@ std::shared_ptr create(const std::string& logger_name, const Arg // #ifdef SPDLOG_TRACE_ON -#define SPDLOG_TRACE(logger, ...) logger->force_log(level::TRACE, __FILE__, " #", __LINE__,": " __VA_ARGS__) +#define SPDLOG_TRACE(logger, ...) logger->force_log(spdlog::level::trace, __VA_ARGS__) << " (" << __FILE__ << " #" << __LINE__ <<")"; #else #define SPDLOG_TRACE(logger, ...) #endif #ifdef SPDLOG_DEBUG_ON -#define SPDLOG_DEBUG(logger, ...) logger->force_log(level::DEBUG, __VA_ARGS__) +#define SPDLOG_DEBUG(logger, ...) logger->force_log(spdlog::level::debug, __VA_ARGS__) #else #define SPDLOG_DEBUG(logger, ...) #endif