lightningd: clean up logging initializations.

Rather than initializating the "print_level" field on first use, we can
do it in logging_options_parsed(), now we have a linked list of them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-19 14:25:48 +09:30
parent 8c89d618cb
commit e0c1c8ec81
2 changed files with 20 additions and 20 deletions

View File

@@ -2967,7 +2967,7 @@ def test_notimestamp_logging(node_factory):
# Make sure this is specified *before* other options!
l1.daemon.early_opts = ['--log-timestamps=false']
l1.start()
assert l1.daemon.logs[0].startswith("DEBUG")
assert l1.daemon.logs[0].startswith("lightningd-1 DEBUG")
assert l1.rpc.listconfigs()['configs']['log-timestamps']['value_bool'] is False