mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Moved flush call to logger::_log_msg() function.
This commit is contained in:
@@ -290,6 +290,10 @@ inline void spdlog::logger::_log_msg(details::log_msg& msg)
|
||||
_formatter->format(msg);
|
||||
for (auto &sink : _sinks)
|
||||
sink->log(msg);
|
||||
|
||||
const auto flush_level = _flush_level.load(std::memory_order_relaxed);
|
||||
if (msg.level >= flush_level)
|
||||
flush();
|
||||
}
|
||||
|
||||
inline void spdlog::logger::_set_pattern(const std::string& pattern)
|
||||
|
||||
Reference in New Issue
Block a user