Commit 1fd43fe6 authored by gabime's avatar gabime

Fixed async_logger::clone

parent 29e21cc7
...@@ -99,10 +99,7 @@ SPDLOG_INLINE void spdlog::async_logger::backend_dump_backtrace_() ...@@ -99,10 +99,7 @@ SPDLOG_INLINE void spdlog::async_logger::backend_dump_backtrace_()
SPDLOG_INLINE std::shared_ptr<spdlog::logger> spdlog::async_logger::clone(std::string new_name) SPDLOG_INLINE std::shared_ptr<spdlog::logger> spdlog::async_logger::clone(std::string new_name)
{ {
auto cloned = std::make_shared<spdlog::async_logger>(std::move(new_name), sinks_.begin(), sinks_.end(), thread_pool_, overflow_policy_); auto cloned = std::make_shared<spdlog::async_logger>(*this);
cloned->name_ = std::move(new_name);
cloned->set_level(this->level());
cloned->flush_on(this->flush_level());
cloned->set_error_handler(this->custom_err_handler_);
return cloned; return cloned;
} }
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