lightningd: remember --log-file arg.

And fclose old ones if we get handed it multiple times.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-01-29 11:00:15 +10:30
committed by Christian Decker
parent 7fd5808803
commit bd3480dc9c
5 changed files with 38 additions and 9 deletions

View File

@@ -6,6 +6,7 @@
#include <common/type_to_string.h>
#include <stdarg.h>
struct lightningd;
struct timerel;
enum log_level {
@@ -85,7 +86,7 @@ void log_each_line_(const struct log_book *lr,
void log_dump_to_file(int fd, const struct log_book *lr);
void opt_register_logging(struct log *log);
void opt_register_logging(struct lightningd *ld);
void crashlog_activate(const char *argv0, struct log *log);
/* Convenience parent for temporary allocations (eg. type_to_string)