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>
This commit is contained in:
UdjinM6 2019-08-28 10:55:05 +03:00 committed by GitHub
parent 0e94e97cc5
commit 3d5eabcfbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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