From 5b0b8579b2341bfc9bea146b7d774160277080bb Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 22 Mar 2020 00:27:42 +0200 Subject: [PATCH] Fix #1485 by removing SPDLOG_NO_NAME option --- include/spdlog/pattern_formatter-inl.h | 5 ++--- include/spdlog/tweakme.h | 7 ------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index d333555d..6bb319c8 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -933,16 +933,15 @@ public: dest.push_back(']'); dest.push_back(' '); -#ifndef SPDLOG_NO_NAME + // append logger name if exists if (msg.logger_name.size() > 0) { dest.push_back('['); - // fmt_helper::append_str(*msg.logger_name, dest); fmt_helper::append_string_view(msg.logger_name, dest); dest.push_back(']'); dest.push_back(' '); } -#endif + dest.push_back('['); // wrap the level name with color msg.color_range_start = dest.size(); diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index b67043e0..1e9235c8 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -38,13 +38,6 @@ // #define SPDLOG_NO_TLS /////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// Uncomment if logger name logging is not needed. -// This will prevent spdlog from copying the logger name on each log call. -// -// #define SPDLOG_NO_NAME -/////////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// // Uncomment to avoid spdlog's usage of atomic log levels // Use only if your code never modifies a logger's log levels concurrently by