mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: suppress IO_OUT logging for getlog command
Before this, the response of `getlog io` blew up quickly when called multiple times.
This commit is contained in:
committed by
Rusty Russell
parent
8feb05aef4
commit
db57d9c5d2
@@ -515,6 +515,16 @@ struct json_stream *json_stream_raw_for_cmd(struct command *cmd)
|
||||
return js;
|
||||
}
|
||||
|
||||
void json_stream_log_suppress_for_cmd(struct json_stream *js,
|
||||
const struct command *cmd)
|
||||
{
|
||||
const char *nm = cmd->json_cmd->name;
|
||||
const char *s = tal_fmt(tmpctx, "Suppressing logging of %s command", nm);
|
||||
log_io(cmd->jcon->log, LOG_IO_OUT, s, NULL, 0);
|
||||
json_stream_log_suppress(js, strdup(nm));
|
||||
|
||||
}
|
||||
|
||||
static struct json_stream *json_start(struct command *cmd)
|
||||
{
|
||||
struct json_stream *js = json_stream_raw_for_cmd(cmd);
|
||||
|
||||
Reference in New Issue
Block a user