mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
removed the confusing stop() function
This commit is contained in:
@@ -60,12 +60,6 @@ inline void spdlog::async_logger::_set_pattern(const std::string& pattern)
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void spdlog::async_logger::_stop()
|
||||
{
|
||||
set_level(level::off);
|
||||
}
|
||||
|
||||
inline void spdlog::async_logger::_log_msg(details::log_msg& msg)
|
||||
{
|
||||
_async_log_helper->log(msg);
|
||||
|
||||
@@ -229,11 +229,6 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
|
||||
return msg_level >= _level.load();
|
||||
}
|
||||
|
||||
inline void spdlog::logger::stop()
|
||||
{
|
||||
_stop();
|
||||
}
|
||||
|
||||
//
|
||||
// protected virtual called at end of each user log call (if enabled) by the line_logger
|
||||
//
|
||||
@@ -253,12 +248,4 @@ inline void spdlog::logger::_set_formatter(formatter_ptr msg_formatter)
|
||||
_formatter = msg_formatter;
|
||||
}
|
||||
|
||||
inline void spdlog::logger::_stop()
|
||||
{
|
||||
set_level(level::off);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -127,14 +127,6 @@ public:
|
||||
_async_mode = false;
|
||||
}
|
||||
|
||||
void stop_all()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
_level = level::off;
|
||||
for (auto& l : _loggers)
|
||||
l.second->stop();
|
||||
}
|
||||
|
||||
|
||||
static registry& instance()
|
||||
{
|
||||
|
||||
@@ -142,7 +142,4 @@ inline void spdlog::set_sync_mode()
|
||||
details::registry::instance().set_sync_mode();
|
||||
}
|
||||
|
||||
inline void spdlog::stop()
|
||||
{
|
||||
return details::registry::instance().stop_all();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user