| 703 | } |
| 704 | |
| 705 | void json_stream_log_suppress_for_cmd(struct json_stream *js, |
| 706 | const struct command *cmd) |
| 707 | { |
| 708 | const char *nm = cmd->json_cmd->name; |
| 709 | |
| 710 | /* Catch the case where they sent this command then hung up. */ |
| 711 | if (cmd->jcon) { |
| 712 | const char *s = tal_fmt(tmpctx, "Suppressing logging of %s command", nm); |
| 713 | log_io(cmd->jcon->log, LOG_IO_OUT, NULL, s, NULL, 0); |
| 714 | } |
| 715 | |
| 716 | /* Really shouldn't be used for anything else */ |
| 717 | assert(streq(nm, "getlog")); |
| 718 | js->log = NULL; |
| 719 | } |
| 720 | |
| 721 | static struct json_stream *json_start(struct command *cmd) |
| 722 | { |