Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/misc.cpp
Show First 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"When called without an argument, returns the list of categories with " | "When called without an argument, returns the list of categories with " | ||||
"status that are currently being debug logged or not.\n" | "status that are currently being debug logged or not.\n" | ||||
"When called with arguments, adds or removes categories from debug " | "When called with arguments, adds or removes categories from debug " | ||||
"logging and return the lists above.\n" | "logging and return the lists above.\n" | ||||
"The arguments are evaluated in order \"include\", \"exclude\".\n" | "The arguments are evaluated in order \"include\", \"exclude\".\n" | ||||
"If an item is both included and excluded, it will thus end up being " | "If an item is both included and excluded, it will thus end up being " | ||||
"excluded.\n" | "excluded.\n" | ||||
"The valid logging categories are: " + | "The valid logging categories are: " + | ||||
ListLogCategories() + | LogInstance().LogCategoriesString() + | ||||
"\n" | "\n" | ||||
"In addition, the following are available as category names with " | "In addition, the following are available as category names with " | ||||
"special meanings:\n" | "special meanings:\n" | ||||
" - \"all\", \"1\" : represent all logging categories.\n" | " - \"all\", \"1\" : represent all logging categories.\n" | ||||
" - \"none\", \"0\" : even if other logging categories are " | " - \"none\", \"0\" : even if other logging categories are " | ||||
"specified, ignore all of them.\n", | "specified, ignore all of them.\n", | ||||
{ | { | ||||
{"include", | {"include", | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | if (changed_log_categories & BCLog::LIBEVENT) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, | throw JSONRPCError(RPC_INVALID_PARAMETER, | ||||
"libevent logging cannot be updated when " | "libevent logging cannot be updated when " | ||||
"using libevent before v2.1.1."); | "using libevent before v2.1.1."); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
UniValue result(UniValue::VOBJ); | UniValue result(UniValue::VOBJ); | ||||
std::vector<CLogCategoryActive> vLogCatActive = ListActiveLogCategories(); | for (const auto &logCatActive : LogInstance().LogCategoriesList()) { | ||||
for (const auto &logCatActive : vLogCatActive) { | |||||
result.pushKV(logCatActive.category, logCatActive.active); | result.pushKV(logCatActive.category, logCatActive.active); | ||||
} | } | ||||
return result; | return result; | ||||
} | } | ||||
static UniValue echo(const Config &config, const JSONRPCRequest &request) { | static UniValue echo(const Config &config, const JSONRPCRequest &request) { | ||||
if (request.fHelp) { | if (request.fHelp) { | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |