common: allow subdaemons to specify the node_id in status messages.

This is ignored in subdaemons which are per-peer, but very useful for
multi-peer daemons like connectd and gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-17 22:12:33 +10:30
parent e433d4ddc1
commit 00cb5adfe6
28 changed files with 140 additions and 60 deletions

View File

@@ -28,7 +28,9 @@
static bool verbose = false;
void status_fmt(enum log_level level, const char *fmt, ...)
void status_fmt(enum log_level level,
const struct node_id *node_id,
const char *fmt, ...)
{
if (verbose) {
va_list ap;