mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Update registry-inl.h fix #2691
This commit is contained in:
parent
0ca574ae16
commit
e539d6ae42
@ -219,8 +219,9 @@ SPDLOG_INLINE void registry::flush_all()
|
||||
SPDLOG_INLINE void registry::drop(const std::string &logger_name)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(logger_map_mutex_);
|
||||
auto is_default_logger = default_logger_ && default_logger_->name() == logger_name;
|
||||
loggers_.erase(logger_name);
|
||||
if (default_logger_ && default_logger_->name() == logger_name)
|
||||
if (is_default_logger)
|
||||
{
|
||||
default_logger_.reset();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user