options: let log-level subsystem filter also cover nodeid.

That's useful for "tell me everything about this node" debugging.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #5348
Changelog-Added: lightningd: `log-level=debug:<partial-nodeid>` supported to get debug-level logs for everything about a peer.
This commit is contained in:
Rusty Russell
2022-07-08 19:23:11 +09:30
parent 32af92145b
commit f6f1844e15
7 changed files with 25 additions and 13 deletions

View File

@@ -2435,6 +2435,14 @@ def test_getlog(node_factory):
assert [l for l in logs if l['type'] == 'SKIPPED'] == []
def test_log_filter(node_factory):
"""Test the log-level option with subsystem filters"""
# This actually suppresses debug!
l1, l2 = node_factory.line_graph(2, opts=[{'log-level': ['debug', 'broken:022d223620']}, {}])
assert not l1.daemon.is_in_log(r'-chan#[0-9]*:')
def test_force_feerates(node_factory):
l1 = node_factory.get_node(options={'force-feerates': 1111})
assert l1.rpc.listconfigs()['force-feerates'] == '1111'