diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 43f39600..ed7d2361 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -143,6 +143,11 @@ public: // T can be statically converted to string_view template::value, T>::type * = nullptr> void log(source_loc loc, level::level_enum lvl, const T &msg) + { + log(loc,lvl, string_view_t{msg}); + } + + void log(source_loc loc, level::level_enum lvl, string_view_t msg) { bool log_enabled = should_log(lvl); bool traceback_enabled = tracer_.enabled();