diff --git a/Utilities/Log.cpp b/Utilities/Log.cpp index 6a4092334c..d6950a4ba9 100644 --- a/Utilities/Log.cpp +++ b/Utilities/Log.cpp @@ -245,6 +245,19 @@ namespace logs logs::listener::~listener() { + // Shut up all channels on exit + if (auto logger = get_logger()) + { + if (logger == this) + { + return; + } + + for (auto&& pair : logger->channels) + { + pair.second->enabled.store(level::always, std::memory_order_relaxed); + } + } } void logs::listener::add(logs::listener* _new)