mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
rpc: make logging method reject "0" category and correct the help text
Current logging RPC method documentation claims to accept "0" and "none" categories, but the "none" argument is actually rejected and the "0" argument is ignored. Update the implementation to refuse both categories, and remove the help text claiming to support them.
This commit is contained in:
parent
8c6f3bf163
commit
74dd33cb0a
@ -219,10 +219,6 @@ bool GetLogCategory(BCLog::LogFlags& flag, std::string_view str)
|
||||
flag = BCLog::ALL;
|
||||
return true;
|
||||
}
|
||||
if (str == "0") {
|
||||
flag = BCLog::NONE;
|
||||
return true;
|
||||
}
|
||||
auto it = LOG_CATEGORIES_BY_STR.find(str);
|
||||
if (it != LOG_CATEGORIES_BY_STR.end()) {
|
||||
flag = it->second;
|
||||
|
@ -221,7 +221,6 @@ static RPCHelpMan logging()
|
||||
"The valid logging categories are: " + LogInstance().LogCategoriesString() + "\n"
|
||||
"In addition, the following are available as category names with special meanings:\n"
|
||||
" - \"all\", \"1\" : represent all logging categories.\n"
|
||||
" - \"none\", \"0\" : even if other logging categories are specified, ignore all of them.\n"
|
||||
,
|
||||
{
|
||||
{"include", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "The categories to add to debug logging",
|
||||
|
Loading…
Reference in New Issue
Block a user