MCPcopy Create free account
hub / github.com/ElementsProject/lightning / param_getloglevel

Function param_getloglevel

lightningd/log.c:1237–1255  ·  view source on GitHub ↗

The io log contains raw JSON-RPC and plugin traffic, which can contain * secrets (such as runes), and getlog returns the entire log book: so we * don't serve io here. It's still available in the log file, for those who * run with --log-level=io. */

Source from the content-addressed store, hash-verified

1235 * don't serve io here. It's still available in the log file, for those who
1236 * run with --log-level=io. */
1237static struct command_result *param_getloglevel(struct command *cmd,
1238 const char *name,
1239 const char *buffer,
1240 const jsmntok_t *tok,
1241 enum log_level **level)
1242{
1243 struct command_result *ret;
1244
1245 ret = param_loglevel(cmd, name, buffer, tok, level);
1246 if (ret)
1247 return ret;
1248
1249 if (**level == LOG_IO_IN || **level == LOG_IO_OUT)
1250 return command_fail_badparam(cmd, name, buffer, tok,
1251 "io logs are not available here:"
1252 " use --log-level=io and read the"
1253 " log file");
1254 return NULL;
1255}
1256
1257static struct command_result *json_getlog(struct command *cmd,
1258 const char *buffer,

Callers

nothing calls this directly

Calls 2

param_loglevelFunction · 0.70
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected