gossip: Do not log anything, it breaks a daemon connection!

This came up while debugging the gossip daemon breaking upon calling
`getroute`. It turns out that log was still writing to stdout, but
stdout had been reused for an inter-daemon socket, which would
break...
This commit is contained in:
Christian Decker 2017-03-18 19:59:18 +01:00 committed by Rusty Russell
parent 62ccf266fa
commit 23a1d7d475

View File

@ -529,7 +529,9 @@ int main(int argc, char *argv[])
SECP256K1_CONTEXT_SIGN);
daemon = tal(NULL, struct daemon);
log_book = new_log_book(daemon, 2 * 1024 * 1024, LOG_INFORM);
/* Do not log absolutely anything, stdout is now a socket
* connected to some other daemon. */
log_book = new_log_book(daemon, 2 * 1024 * 1024, LOG_BROKEN + 1);
base_log =
new_log(daemon, log_book, "lightningd_gossip(%u):", (int)getpid());
daemon->rstate = new_routing_state(daemon, base_log);