mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
fix: remove 'count' from logger level (#2408)
This commit is contained in:
@@ -45,14 +45,13 @@ class ConfigValue;
|
||||
/**
|
||||
* @brief specific values that are accepted for logger levels in config.
|
||||
*/
|
||||
static constexpr std::array<char const*, 7> kLOG_LEVELS = {
|
||||
static constexpr std::array<char const*, 6> kLOG_LEVELS = {
|
||||
"trace",
|
||||
"debug",
|
||||
"info",
|
||||
"warning",
|
||||
"error",
|
||||
"fatal",
|
||||
"count",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -219,7 +219,7 @@ getMinSeverity(config::ClioConfigDefinition const& config, Severity defaultSever
|
||||
for (auto it = overrides.begin<util::config::ObjectView>(); it != overrides.end<util::config::ObjectView>(); ++it) {
|
||||
auto const& channelConfig = *it;
|
||||
auto const name = channelConfig.get<std::string>("channel");
|
||||
if (std::ranges::count(Logger::kCHANNELS, name) == 0) { // TODO: use std::ranges::contains when available
|
||||
if (not std::ranges::contains(Logger::kCHANNELS, name)) {
|
||||
return std::unexpected{fmt::format("Can't override settings for log channel {}: invalid channel", name)};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user