From ab4f1f05500a9e9fa6504a02cf5c628788b2fc33 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 9 Mar 2017 19:34:04 +0100 Subject: [PATCH] gossip: Add missing log to gossip daemon We will eventually ween off of the logging, or replace it with status messages that log in `lightningd`, but for now we still have the routing module that does some logging. --- lightningd/gossip/gossip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lightningd/gossip/gossip.c b/lightningd/gossip/gossip.c index c5115f21d..dbcbd543c 100644 --- a/lightningd/gossip/gossip.c +++ b/lightningd/gossip/gossip.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -425,6 +426,8 @@ static struct io_plan *next_req_in(struct io_conn *conn, struct daemon *daemon) int main(int argc, char *argv[]) { struct daemon *daemon; + struct log_book *log_book; + struct log *base_log; subdaemon_debug(argc, argv); @@ -434,7 +437,10 @@ int main(int argc, char *argv[]) } daemon = tal(NULL, struct daemon); - daemon->rstate = new_routing_state(daemon, NULL); + log_book = new_log_book(daemon, 2 * 1024 * 1024, LOG_INFORM); + base_log = + new_log(daemon, log_book, "lightningd_gossip(%u):", (int)getpid()); + daemon->rstate = new_routing_state(daemon, base_log); list_head_init(&daemon->peers); timers_init(&daemon->timers, time_mono()); daemon->msg_in = NULL;