Skip to content

Commit 74dd33c

Browse files
committed
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.
1 parent 8c6f3bf commit 74dd33c

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/logging.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ bool GetLogCategory(BCLog::LogFlags& flag, std::string_view str)
219219
flag = BCLog::ALL;
220220
return true;
221221
}
222-
if (str == "0") {
223-
flag = BCLog::NONE;
224-
return true;
225-
}
226222
auto it = LOG_CATEGORIES_BY_STR.find(str);
227223
if (it != LOG_CATEGORIES_BY_STR.end()) {
228224
flag = it->second;

src/rpc/node.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ static RPCHelpMan logging()
221221
"The valid logging categories are: " + LogInstance().LogCategoriesString() + "\n"
222222
"In addition, the following are available as category names with special meanings:\n"
223223
" - \"all\", \"1\" : represent all logging categories.\n"
224-
" - \"none\", \"0\" : even if other logging categories are specified, ignore all of them.\n"
225224
,
226225
{
227226
{"include", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "The categories to add to debug logging",

0 commit comments

Comments
 (0)