Browse Source

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.
ppa-0.6.1
Christian Decker 8 years ago
parent
commit
ab4f1f0550
  1. 8
      lightningd/gossip/gossip.c

8
lightningd/gossip/gossip.c

@ -10,6 +10,7 @@
#include <ccan/take/take.h> #include <ccan/take/take.h>
#include <ccan/tal/str/str.h> #include <ccan/tal/str/str.h>
#include <daemon/broadcast.h> #include <daemon/broadcast.h>
#include <daemon/log.h>
#include <daemon/routing.h> #include <daemon/routing.h>
#include <daemon/timeout.h> #include <daemon/timeout.h>
#include <errno.h> #include <errno.h>
@ -425,6 +426,8 @@ static struct io_plan *next_req_in(struct io_conn *conn, struct daemon *daemon)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
struct daemon *daemon; struct daemon *daemon;
struct log_book *log_book;
struct log *base_log;
subdaemon_debug(argc, argv); subdaemon_debug(argc, argv);
@ -434,7 +437,10 @@ int main(int argc, char *argv[])
} }
daemon = tal(NULL, struct daemon); 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); list_head_init(&daemon->peers);
timers_init(&daemon->timers, time_mono()); timers_init(&daemon->timers, time_mono());
daemon->msg_in = NULL; daemon->msg_in = NULL;

Loading…
Cancel
Save