| 1012 | } |
| 1013 | |
| 1014 | void opt_register_logging(struct lightningd *ld) |
| 1015 | { |
| 1016 | opt_register_early_arg("--log-level", |
| 1017 | opt_log_level, show_log_level, ld->log_book, |
| 1018 | "log level (io, debug, info, unusual, broken) [:prefix]"); |
| 1019 | clnopt_witharg("--log-timestamps", OPT_EARLY|OPT_SHOWBOOL, |
| 1020 | opt_set_bool_arg, opt_show_bool, |
| 1021 | &ld->log_book->print_timestamps, |
| 1022 | "prefix log messages with timestamp"); |
| 1023 | clnopt_witharg("--log-prefix", OPT_EARLY|OPT_KEEP_WHITESPACE, |
| 1024 | arg_log_prefix, show_log_prefix, ld->log_book, "log prefix"); |
| 1025 | clnopt_witharg("--log-file=<file>", |
| 1026 | OPT_EARLY|OPT_MULTI, |
| 1027 | arg_log_to_file, NULL, ld, |
| 1028 | "Also log to file (- for stdout)"); |
| 1029 | } |
| 1030 | |
| 1031 | void logging_options_parsed(struct log_book *log_book) |
| 1032 | { |