log: expand BCLog::LogFlags (categories) to 64 bits

This will increase the maximum number of logging categories
from 32 to 64.
This commit is contained in:
Larry Ruane
2022-12-01 09:02:50 -07:00
parent ee57737bd6
commit b31a0cd037
4 changed files with 41 additions and 39 deletions

View File

@@ -244,15 +244,15 @@ static RPCHelpMan logging()
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
uint32_t original_log_categories = LogInstance().GetCategoryMask();
BCLog::CategoryMask original_log_categories = LogInstance().GetCategoryMask();
if (request.params[0].isArray()) {
EnableOrDisableLogCategories(request.params[0], true);
}
if (request.params[1].isArray()) {
EnableOrDisableLogCategories(request.params[1], false);
}
uint32_t updated_log_categories = LogInstance().GetCategoryMask();
uint32_t changed_log_categories = original_log_categories ^ updated_log_categories;
BCLog::CategoryMask updated_log_categories = LogInstance().GetCategoryMask();
BCLog::CategoryMask changed_log_categories = original_log_categories ^ updated_log_categories;
// Update libevent logging if BCLog::LIBEVENT has changed.
if (changed_log_categories & BCLog::LIBEVENT) {