diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index e22b8bbc..af261ce7 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -62,7 +62,8 @@ public: if (automatic_registration_) { - register_logger(new_logger); + throw_if_exists_(new_logger->name()); + loggers_[new_logger->name()] = std::move(new_logger); } }