Commit 36f25389 authored by gabime's avatar gabime

Pass logger name to tracer

parent 8280c0d6
......@@ -165,7 +165,7 @@ SPDLOG_INLINE void logger::dump_backtrace()
if (backtrace_sink_)
{
auto tracer = static_cast<sinks::backtrace_sink_mt *>(backtrace_sink_.get());
tracer->dump_backtrace();
tracer->dump_backtrace(name());
}
}
......
......@@ -40,10 +40,10 @@ public:
return filter_level_;
}
void dump_backtrace()
void dump_backtrace(string_view_t logger_name)
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
dump_backtrace_();
dump_backtrace_(logger_name);
}
protected:
......@@ -61,13 +61,12 @@ protected:
}
}
void dump_backtrace_()
void dump_backtrace_(string_view_t logger_name)
{
if (traceback_msgs_.empty())
{
return;
}
const char *logger_name = "??????";
dist_sink<Mutex>::sink_it_(
details::log_msg{logger_name, level::info, "********************* Backtrace Start *********************"});
......
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