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

Function EnableOrDisableLogCategories

src/rpc/misc.cpp:359–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359static void EnableOrDisableLogCategories(UniValue cats, bool enable) {
360 cats = cats.get_array();
361 for (unsigned int i = 0; i < cats.size(); ++i) {
362 std::string cat = cats[i].get_str();
363
364 bool success;
365 if (enable) {
366 success = g_logger->EnableCategory(cat);
367 } else {
368 success = g_logger->DisableCategory(cat);
369 }
370
371 if (!success) {
372 throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown logging category " + cat);
373 }
374 }
375}
376
377UniValue logging(const JSONRPCRequest& request)
378{

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