| 999 | } |
| 1000 | |
| 1001 | void opt_register_logging(struct lightningd *ld) |
| 1002 | { |
| 1003 | opt_register_early_arg("--log-level", |
| 1004 | opt_log_level, show_log_level, ld->log_book, |
| 1005 | "log level (io, debug, info, unusual, broken) [:prefix]"); |
| 1006 | clnopt_witharg("--log-timestamps", OPT_EARLY|OPT_SHOWBOOL, |
| 1007 | opt_set_bool_arg, opt_show_bool, |
| 1008 | &ld->log_book->print_timestamps, |
| 1009 | "prefix log messages with timestamp"); |
| 1010 | clnopt_witharg("--log-prefix", OPT_EARLY|OPT_KEEP_WHITESPACE, |
| 1011 | arg_log_prefix, show_log_prefix, ld->log_book, "log prefix"); |
| 1012 | clnopt_witharg("--log-file=<file>", |
| 1013 | OPT_EARLY|OPT_MULTI, |
| 1014 | arg_log_to_file, NULL, ld, |
| 1015 | "Also log to file (- for stdout)"); |
| 1016 | } |
| 1017 | |
| 1018 | void logging_options_parsed(struct log_book *log_book) |
| 1019 | { |