MCPcopy Create free account
hub / github.com/ElementsProject/elements / EnableOrDisableLogCategories

Function EnableOrDisableLogCategories

src/rpc/misc.cpp:621–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621static void EnableOrDisableLogCategories(UniValue cats, bool enable) {
622 cats = cats.get_array();
623 for (unsigned int i = 0; i < cats.size(); ++i) {
624 std::string cat = cats[i].get_str();
625
626 bool success;
627 if (enable) {
628 success = LogInstance().EnableCategory(cat);
629 } else {
630 success = LogInstance().DisableCategory(cat);
631 }
632
633 if (!success) {
634 throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown logging category " + cat);
635 }
636 }
637}
638
639static RPCHelpMan logging()
640{

Callers 1

loggingFunction · 0.85

Calls 4

JSONRPCErrorFunction · 0.85
EnableCategoryMethod · 0.80
DisableCategoryMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected