Better support for logger copy with backtrace

This commit is contained in:
gabime
2019-08-27 20:20:15 +03:00
parent 13e9135935
commit c55336e78d
3 changed files with 14 additions and 3 deletions

View File

@@ -22,11 +22,10 @@ SPDLOG_INLINE logger::logger(const logger &other)
, level_(other.level_.load(std::memory_order_relaxed))
, flush_level_(other.flush_level_.load(std::memory_order_relaxed))
, custom_err_handler_(other.custom_err_handler_)
, tracer_(other.tracer_)
{
if(other.tracer_)
{
enable_backtrace(other.tracer_->n_messages());
tracer_ = std::make_shared<details::backtracer>(*other.tracer_);
}
}