From 605f037e4eb61cf65d26f55af38d5bf684b07650 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 26 Sep 2023 02:03:12 +0300 Subject: [PATCH] Update pattern_formatter.cpp --- src/pattern_formatter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pattern_formatter.cpp b/src/pattern_formatter.cpp index 5bce82d7..777b3cce 100644 --- a/src/pattern_formatter.cpp +++ b/src/pattern_formatter.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -102,7 +103,7 @@ public: : flag_formatter(padinfo) {} void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { - const string_view_t &level_name = to_string_view(msg.log_level); + auto level_name = to_string_view(msg.log_level); ScopedPadder p(level_name.size(), padinfo_, dest); fmt_helper::append_string_view(level_name, dest); } @@ -116,7 +117,7 @@ public: : flag_formatter(padinfo) {} void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { - auto level_name = to_short_string_view(msg.log_level)}; + auto level_name = to_short_string_view(msg.log_level); ScopedPadder p(level_name.size(), padinfo_, dest); fmt_helper::append_string_view(level_name, dest); }