|
|
@ -80,7 +80,11 @@ public:
|
|
|
|
template<typename... Args>
|
|
|
|
template<typename... Args>
|
|
|
|
void log(source_loc loc, level::level_enum lvl, format_string_t<Args...> fmt, Args &&...args)
|
|
|
|
void log(source_loc loc, level::level_enum lvl, format_string_t<Args...> fmt, Args &&...args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
log_with_format_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...);
|
|
|
|
if (should_log(lvl))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
log_with_format_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template<typename... Args>
|
|
|
|
template<typename... Args>
|
|
|
@ -247,10 +251,7 @@ protected:
|
|
|
|
template<typename... Args>
|
|
|
|
template<typename... Args>
|
|
|
|
void log_with_format_(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)
|
|
|
|
void log_with_format_(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!should_log(lvl))
|
|
|
|
assert(should_log(lvl));
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SPDLOG_TRY
|
|
|
|
SPDLOG_TRY
|
|
|
|
{
|
|
|
|
{
|
|
|
|
memory_buf_t buf;
|
|
|
|
memory_buf_t buf;
|
|
|
|