Unverified Commit d4cbb4ed authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Update logger.h

parent 8cc84b3e
...@@ -324,9 +324,7 @@ protected: ...@@ -324,9 +324,7 @@ protected:
template<typename... Args> template<typename... Args>
void log_(source_loc loc, level::level_enum lvl, wstring_view_t fmt, Args &&... args) void log_(source_loc loc, level::level_enum lvl, wstring_view_t fmt, Args &&... args)
{ {
bool log_enabled = should_log(lvl); if (!should_log(lvl))
bool traceback_enabled = tracer_.enabled();
if (!log_enabled)
{ {
return; return;
} }
...@@ -348,9 +346,7 @@ protected: ...@@ -348,9 +346,7 @@ protected:
template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::wstring_view_t>::value, int>::type = 0> template<class T, typename std::enable_if<std::is_convertible<const T &, spdlog::wstring_view_t>::value, int>::type = 0>
void log_(source_loc loc, level::level_enum lvl, const T &msg) void log_(source_loc loc, level::level_enum lvl, const T &msg)
{ {
bool log_enabled = should_log(lvl); if (!should_log(lvl))
bool traceback_enabled = tracer_.enabled();
if (!log_enabled && !traceback_enabled)
{ {
return; return;
} }
...@@ -370,7 +366,6 @@ protected: ...@@ -370,7 +366,6 @@ protected:
// and save backtrace (if backtrace is enabled). // and save backtrace (if backtrace is enabled).
virtual void sink_it_(const details::log_msg &msg); virtual void sink_it_(const details::log_msg &msg);
virtual void flush_(); virtual void flush_();
void dump_backtrace_();
bool should_flush_(const details::log_msg &msg); bool should_flush_(const details::log_msg &msg);
// handle errors during logging. // handle errors during logging.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment