lightningd: multiple log-file options allow more than one log output.

I've wanted this for a while: the ability to log to multiple places
at once.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: lightningd: `log-file` option specified multiple times opens multiple log files.
This commit is contained in:
Rusty Russell
2022-06-26 13:55:01 +09:30
parent 92f10f2c34
commit 56dde2cb77
6 changed files with 116 additions and 65 deletions

View File

@@ -155,8 +155,10 @@ Prefix for log lines: this can be customized if you want to merge logs
with multiple daemons.
**log-file**=*PATH*
Log to this file instead of stdout. Sending lightningd(8) SIGHUP will
cause it to reopen this file (useful for log rotation).
Log to this file (instead of stdout). If you specify this more than once
you'll get more than one log file: **-** is used to mean stdout. Sending
lightningd(8) SIGHUP will cause it to reopen each file (useful for log
rotation).
**log-timestamps**=*BOOL*
Set this to false to turn off timestamp prefixes (they will still appear