Skip to content

Commit 3d5eabc

Browse files
UdjinM6thephez
andauthored
Update/unify debug and logging rpc descriptions (#3071)
* Update/unify `debug` and `logging` rpc descriptions * Add yet another meta - "" * Apply suggestions from code review Co-Authored-By: thephez <thephez@users.noreply.github.com>
1 parent 0e94e97 commit 3d5eabc

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/rpc/misc.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,15 @@ UniValue debug(const JSONRPCRequest& request)
134134
throw std::runtime_error(
135135
"debug \"category\"\n"
136136
"Change debug category on the fly. Specify single category or use '+' to specify many.\n"
137+
"The valid debug categories are: " + ListLogCategories() + ".\n"
138+
"libevent logging is configured on startup and cannot be modified by this RPC during runtime.\n"
139+
"There are also a few meta-categories:\n"
140+
" - \"all\", \"1\" and \"\" activate all categories at once;\n"
141+
" - \"dash\" activates all Dash-specific categories at once;\n"
142+
" - \"none\" (or \"0\") deactivates all categories at once.\n"
143+
"Note: If specified category doesn't match any of the above, no error is thrown.\n"
137144
"\nArguments:\n"
138-
"1. \"category\" (string, required) The name of the debug category to turn on. Can be one of the following:\n"
139-
" addrman, bench, cmpctblock, coindb, db, http, leveldb, libevent, lock, mempool,\n"
140-
" mempoolrej, net, proxy, prune, qt, rand, reindex, rpc, selectcoins, tor, zmq, dash\n"
141-
" (or specifically: chainlocks, gobject, instantsend, keepass, llmq, llmq-dkg, llmq-sigs,\n"
142-
" mnpayments, mnsync, privatesend, spork).\n"
143-
" Can also use \"1\" to turn all categories on at once and \"0\" to turn them off.\n"
144-
" Note: If specified category doesn't match any of the above, no error is thrown.\n"
145+
"1. \"category\" (string, required) The name of the debug category to turn on.\n"
145146
"\nResult:\n"
146147
" result (string) \"Debug mode: \" followed by the specified category.\n"
147148
"\nExamples:\n"
@@ -1223,9 +1224,13 @@ UniValue logging(const JSONRPCRequest& request)
12231224
"Gets and sets the logging configuration.\n"
12241225
"When called without an argument, returns the list of categories that are currently being debug logged.\n"
12251226
"When called with arguments, adds or removes categories from debug logging.\n"
1226-
"The valid logging categories are: " + ListLogCategories() + "\n"
1227-
"libevent logging is configured on startup and cannot be modified by this RPC during runtime."
1228-
"Arguments:\n"
1227+
"The valid logging categories are: " + ListLogCategories() + ".\n"
1228+
"libevent logging is configured on startup and cannot be modified by this RPC during runtime.\n"
1229+
"There are also a few meta-categories:\n"
1230+
" - \"all\", \"1\" and \"\" activate all categories at once;\n"
1231+
" - \"dash\" activates all Dash-specific categories at once.\n"
1232+
"To deactivate all categories at once you can specify \"all\" in <exclude>.\n"
1233+
"\nArguments:\n"
12291234
"1. \"include\" (array of strings) add debug logging for these categories.\n"
12301235
"2. \"exclude\" (array of strings) remove debug logging for these categories.\n"
12311236
"\nResult: <categories> (string): a list of the logging categories that are active.\n"

0 commit comments

Comments
 (0)