MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SetCategoryLogLevel

Method SetCategoryLogLevel

src/logging.cpp:605–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605bool BCLog::Logger::SetCategoryLogLevel(std::string_view category_str, std::string_view level_str)
606{
607 const auto flag{GetLogCategory(category_str)};
608 if (!flag) return false;
609
610 const auto level = GetLogLevel(level_str);
611 if (!level.has_value() || level.value() > MAX_USER_SETABLE_SEVERITY_LEVEL) return false;
612 if (*flag == BCLog::NONE) return true;
613
614 STDLOCK(m_cs);
615 m_category_log_levels[*flag] = level.value();
616 return true;
617}
618
619bool util::log::ShouldDebugLog(Category category)
620{

Callers 5

SetLoggingLevelFunction · 0.80
ResetLoggerFunction · 0.80
LogSetupMethod · 0.80
~LogSetupMethod · 0.80
BOOST_FIXTURE_TEST_CASEFunction · 0.80

Calls 3

GetLogLevelFunction · 0.85
has_valueMethod · 0.45
valueMethod · 0.45

Tested by 4

ResetLoggerFunction · 0.64
LogSetupMethod · 0.64
~LogSetupMethod · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64