| 603 | } |
| 604 | |
| 605 | bool 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 | |
| 619 | bool util::log::ShouldDebugLog(Category category) |
| 620 | { |