MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / EnableOrDisableLogCategories

Function EnableOrDisableLogCategories

src/rpc/node.cpp:203–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203static void EnableOrDisableLogCategories(UniValue cats, bool enable) {
204 cats = cats.get_array();
205 for (unsigned int i = 0; i < cats.size(); ++i) {
206 std::string cat = cats[i].get_str();
207
208 bool success;
209 if (enable) {
210 success = LogInstance().EnableCategory(cat);
211 } else {
212 success = LogInstance().DisableCategory(cat);
213 }
214
215 if (!success) {
216 throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown logging category " + cat);
217 }
218 }
219}
220
221static RPCMethod logging()
222{

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