2019-06-04 00:09:16 +03:00
|
|
|
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
|
2019-05-11 20:06:17 +03:00
|
|
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
|
|
|
2023-09-24 20:26:32 +03:00
|
|
|
#include <spdlog/sinks/sink.h>
|
2019-05-13 00:09:00 +03:00
|
|
|
|
2019-11-06 19:09:30 +00:00
|
|
|
#include <spdlog/common.h>
|
2019-04-27 02:34:50 +03:00
|
|
|
|
2023-09-24 13:02:30 +03:00
|
|
|
bool spdlog::sinks::sink::should_log(spdlog::level msg_level) const
|
2019-04-27 02:34:50 +03:00
|
|
|
{
|
|
|
|
|
return msg_level >= level_.load(std::memory_order_relaxed);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-24 13:02:30 +03:00
|
|
|
void spdlog::sinks::sink::set_level(level level)
|
2019-04-27 02:34:50 +03:00
|
|
|
{
|
2023-09-23 17:59:51 +03:00
|
|
|
level_.store(level, std::memory_order_relaxed);
|
2019-04-27 02:34:50 +03:00
|
|
|
}
|
|
|
|
|
|
2023-09-24 13:02:30 +03:00
|
|
|
spdlog::level spdlog::sinks::sink::log_level() const {
|
2023-09-23 17:59:51 +03:00
|
|
|
return static_cast<spdlog::level>(level_.load(std::memory_order_relaxed));
|
2019-04-27 02:34:50 +03:00
|
|
|
}
|