mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
some cleanup in logger
This commit is contained in:
parent
099137fe9a
commit
f63df65245
@ -138,11 +138,9 @@ SPDLOG_INLINE void logger::enable_backtrace(size_t n_messages)
|
||||
{
|
||||
if (!backtrace_sink_)
|
||||
{
|
||||
auto new_backtrace_sink = new spdlog::sinks::backtrace_sink_mt(std::move(sinks_), level(), n_messages);
|
||||
backtrace_sink_.reset(new_backtrace_sink);
|
||||
backtrace_sink_ = std::make_shared<sinks::backtrace_sink_mt>((std::move(sinks_), level(), n_messages));
|
||||
sinks().push_back(backtrace_sink_);
|
||||
assert(sinks().size() == 1);
|
||||
level_.store(level::trace);
|
||||
level_.store(level::trace); // pass all messages to the backtrace sink.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user