lightningd: don't log JSON ids as debug, use log io.

They are cute, sure, but they do spam the logs.

@Suggested-by: @niftynei
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-13 09:57:42 +09:30
parent 42c9aa1a5f
commit caecd1ee0a
5 changed files with 15 additions and 12 deletions

View File

@@ -912,7 +912,9 @@ parse_request(struct json_connection *jcon, const jsmntok_t tok[])
"Expected string for method");
}
log_debug(jcon->log, "IN:id=%s", c->id);
/* Debug was too chatty, so we use IO here, even though we're
* actually just logging the id */
log_io(jcon->log, LOG_IO_IN, NULL, c->id, NULL, 0);
c->json_cmd = find_cmd(jcon->ld->jsonrpc, jcon->buffer, method);
if (!c->json_cmd) {
@@ -1353,7 +1355,7 @@ struct jsonrpc_request *jsonrpc_request_start_(
json_object_start(r->stream, "params");
}
if (log)
log_debug(log, "OUT:id=%s", r->id);
log_io(log, LOG_IO_OUT, NULL, r->id, NULL, 0);
return r;
}