This commit is contained in:
gabi
2014-11-01 02:12:12 +02:00
parent bf303fad19
commit 567e85e6d4
15 changed files with 169 additions and 89 deletions

View File

@@ -22,6 +22,10 @@ inline spdlog::logger::logger(const std::string& logger_name, const It& begin, c
{}
inline spdlog::logger::logger(const std::string& logger_name, spdlog::sink_ptr single_sink) :logger(logger_name, { single_sink })
{}
inline void spdlog::logger::set_formatter(spdlog::formatter_ptr msg_formatter)
{
_formatter = msg_formatter;
@@ -108,9 +112,11 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
return msg_level >= _level.load();
}
inline void spdlog::logger::stop_logging()
inline void spdlog::logger::close()
{
set_level(level::OFF);
for (auto &sink : _sinks)
sink->close();
}