You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spdlog/src/sinks/sink.cpp

21 lines
630 B
C++

// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include <spdlog/sinks/sink.h>
#include <spdlog/common.h>
6 years ago
bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const
6 years ago
{
return msg_level >= level_.load(std::memory_order_relaxed);
}
void spdlog::sinks::sink::set_level(level::level_enum log_level)
6 years ago
{
level_.store(log_level, std::memory_order_relaxed);
6 years ago
}
spdlog::level::level_enum spdlog::sinks::sink::level() const
6 years ago
{
return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed));
}