Commit 3c57133c authored by gabi's avatar gabi

Fixed bug #26 (SPDLOG_TRACE macro does not work as expected)

parent 3d4abbb2
...@@ -126,14 +126,14 @@ std::shared_ptr<spdlog::logger> create(const std::string& logger_name, const Arg ...@@ -126,14 +126,14 @@ std::shared_ptr<spdlog::logger> create(const std::string& logger_name, const Arg
// //
#ifdef SPDLOG_TRACE_ON #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 #else
#define SPDLOG_TRACE(logger, ...) #define SPDLOG_TRACE(logger, ...)
#endif #endif
#ifdef SPDLOG_DEBUG_ON #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 #else
#define SPDLOG_DEBUG(logger, ...) #define SPDLOG_DEBUG(logger, ...)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment