mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Merge branch 'master' of https://github.com/gabime/spdlog
This commit is contained in:
@@ -137,11 +137,9 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
|
||||
return msg_level >= _level.load();
|
||||
}
|
||||
|
||||
inline void spdlog::logger::close()
|
||||
inline void spdlog::logger::stop()
|
||||
{
|
||||
set_level(level::OFF);
|
||||
for (auto &sink : _sinks)
|
||||
sink->close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -104,12 +104,12 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void close_all()
|
||||
void stop_all()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
_level = level::OFF;
|
||||
for (auto& l : _loggers)
|
||||
l.second->close();
|
||||
l.second->stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ inline void spdlog::set_level(level::level_enum log_level)
|
||||
return details::registry::instance().set_level(log_level);
|
||||
}
|
||||
|
||||
inline void spdlog::close()
|
||||
inline void spdlog::stop()
|
||||
{
|
||||
return details::registry::instance().close_all();
|
||||
return details::registry::instance().stop_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user