diff --git a/include/spdlog/async_logger-inl.h b/include/spdlog/async_logger-inl.h index e63fab8a..e1c68565 100644 --- a/include/spdlog/async_logger-inl.h +++ b/include/spdlog/async_logger-inl.h @@ -99,10 +99,7 @@ SPDLOG_INLINE void spdlog::async_logger::backend_dump_backtrace_() SPDLOG_INLINE std::shared_ptr spdlog::async_logger::clone(std::string new_name) { - auto cloned = std::make_shared(std::move(new_name), sinks_.begin(), sinks_.end(), thread_pool_, overflow_policy_); - - cloned->set_level(this->level()); - cloned->flush_on(this->flush_level()); - cloned->set_error_handler(this->custom_err_handler_); + auto cloned = std::make_shared(*this); + cloned->name_ = std::move(new_name); return cloned; }