diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 08e68a74..f804e33a 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -104,6 +104,12 @@ public: log(source_loc{}, lvl, fmt, args...); } + template + void log(level::forceable lvl, string_view_t fmt, const Args &... args) + { + log(source_loc{}, lvl, fmt, args...); + } + template void trace(string_view_t fmt, const Args &... args) { @@ -146,6 +152,12 @@ public: log(source_loc{}, lvl, msg); } + template + void log(level::forceable lvl, const T &msg) + { + log(source_loc{}, lvl, msg); + } + // 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) { @@ -176,6 +188,11 @@ public: log(source_loc{}, lvl, msg); } + void log(level::forceable lvl, string_view_t msg) + { + log(source_loc{}, lvl, msg); + } + // T cannot be statically converted to string_view or wstring_view template::value && !is_convertible_to_wstring_view::value, @@ -268,6 +285,12 @@ public: log(source_loc{}, lvl, fmt, args...); } + template + void log(level::forceable lvl, wstring_view_t fmt, const Args &... args) + { + log(source_loc{}, lvl, fmt, args...); + } + template void trace(wstring_view_t fmt, const Args &... args) {