diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index fd076052..05a40a52 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -17,7 +17,6 @@ #include #include #include -#include #ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT # ifndef _WIN32 @@ -367,7 +366,7 @@ protected: memory_buf_t buf; fmt_lib::vformat_to(std::back_inserter(buf), fmt, fmt_lib::make_format_args(std::forward(args)...)); - details::log_msg log_msg(loc, name_, lvl, details::fmt_helper::to_string_view(buf)); + details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size())); log_it_(log_msg, log_enabled, traceback_enabled); } SPDLOG_LOGGER_CATCH(loc)