mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
Fixed logger::log with std::format under msvc
This commit is contained in:
parent
d8164fe398
commit
ce6bccb194
@ -81,14 +81,17 @@ public:
|
|||||||
{
|
{
|
||||||
if (should_log(lvl))
|
if (should_log(lvl))
|
||||||
{
|
{
|
||||||
log_with_format_(loc, lvl, fmt, std::forward<Args>(args)...);
|
log_with_format_(loc, lvl, fmt.get(), std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
void log(level::level_enum lvl, format_string_t<Args...> fmt, Args &&...args)
|
void log(level::level_enum lvl, format_string_t<Args...> fmt, Args &&...args)
|
||||||
{
|
{
|
||||||
log(source_loc{}, lvl, fmt, std::forward<Args>(args)...);
|
if (should_log(lvl))
|
||||||
|
{
|
||||||
|
log_with_format_(source_loc{}, lvl, fmt.get(), std::forward<Args>(args)...);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename S, typename = is_convertible_to_sv<S>, typename... Args>
|
template<typename S, typename = is_convertible_to_sv<S>, typename... Args>
|
||||||
|
Loading…
Reference in New Issue
Block a user