mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
options: set log-level and log-prefix early.
Otherwise we potentially miss debug-level logs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
65fa1c4f39
commit
a3a5ba5f21
@ -520,11 +520,13 @@ char *arg_log_to_file(const char *arg, struct lightningd *ld)
|
||||
|
||||
void opt_register_logging(struct lightningd *ld)
|
||||
{
|
||||
opt_register_arg("--log-level", arg_log_level, show_log_level, ld->log,
|
||||
"log level (io, debug, info, unusual, broken)");
|
||||
opt_register_arg("--log-prefix", arg_log_prefix, show_log_prefix,
|
||||
ld->log,
|
||||
"log prefix");
|
||||
opt_register_early_arg("--log-level",
|
||||
arg_log_level, show_log_level, ld->log,
|
||||
"log level (io, debug, info, unusual, broken)");
|
||||
opt_register_early_arg("--log-prefix", arg_log_prefix, show_log_prefix,
|
||||
ld->log,
|
||||
"log prefix");
|
||||
/* We want this opened later, once we have moved to lightning dir */
|
||||
opt_register_arg("--log-file=<file>", arg_log_to_file, NULL, ld,
|
||||
"log to file instead of stdout");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user