diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index 16ea5e1ce..69b89ccdd 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -1023,7 +1023,7 @@ class NodeFactory(object): # getpeers. if not fundchannel: for src, dst in connections: - dst.daemon.wait_for_log(r'{}-.*openingd-chan #[0-9]*: Handed peer, entering loop'.format(src.info['id'])) + dst.daemon.wait_for_log(r'{}-.*openingd-chan#[0-9]*: Handed peer, entering loop'.format(src.info['id'])) return nodes # If we got here, we want to fund channels diff --git a/doc/lightningd-config.5 b/doc/lightningd-config.5 index c4ec16606..da281b8f5 100644 --- a/doc/lightningd-config.5 +++ b/doc/lightningd-config.5 @@ -143,6 +143,8 @@ for any subsystem containing that string\. Subsystems include: \fIgossipd\fR: The gossip daemon .IP \[bu] \fIconnectd\fR: The network connection daemon +.IP \[bu] +\fIjsonrpc#FD\fR: Each JSONRPC connection, FD = file descriptor number .RE @@ -151,20 +153,18 @@ internal integer id assigned for the lifetime of the channel: .RS .IP \[bu] -\fIopeningd-chan #N\fR: Each opening / idling daemon -.IP \[bu] -\fIchanneld-chan #N\fR: Each channel management daemon +\fIopeningd-chan#N\fR: Each opening / idling daemon .IP \[bu] -\fIclosingd-chan #N\fR: Each closing negotiation daemon +\fIchanneld-chan#N\fR: Each channel management daemon .IP \[bu] -\fIonchaind-chan #N\fR: Each onchain close handling daemon +\fIclosingd-chan#N\fR: Each closing negotiation daemon .IP \[bu] -\fIjson #FD\fR: Each JSONRPC connection, FD = file descriptor number +\fIonchaind-chan#N\fR: Each onchain close handling daemon .RE So, \fBlog-level=debug:plugin\fR would set debug level logging on all -plugins and the plugin manager\. \fBlog-level=io:chan #55\fR would set +plugins and the plugin manager\. \fBlog-level=io:chan#55\fR would set IO logging on channel number 55 (or 550, for that matter)\. diff --git a/doc/lightningd-config.5.md b/doc/lightningd-config.5.md index aebbd6123..9779695dc 100644 --- a/doc/lightningd-config.5.md +++ b/doc/lightningd-config.5.md @@ -117,19 +117,19 @@ for any subsystem containing that string. Subsystems include: * *hsmd*: The secret-holding daemon * *gossipd*: The gossip daemon * *connectd*: The network connection daemon +* *jsonrpc#FD*: Each JSONRPC connection, FD = file descriptor number The following subsystems exist for each channel, where N is an incrementing internal integer id assigned for the lifetime of the channel: -* *openingd-chan #N*: Each opening / idling daemon -* *channeld-chan #N*: Each channel management daemon -* *closingd-chan #N*: Each closing negotiation daemon -* *onchaind-chan #N*: Each onchain close handling daemon -* *json #FD*: Each JSONRPC connection, FD = file descriptor number +* *openingd-chan#N*: Each opening / idling daemon +* *channeld-chan#N*: Each channel management daemon +* *closingd-chan#N*: Each closing negotiation daemon +* *onchaind-chan#N*: Each onchain close handling daemon So, **log-level=debug:plugin** would set debug level logging on all -plugins and the plugin manager. **log-level=io:chan #55** would set +plugins and the plugin manager. **log-level=io:chan#55** would set IO logging on channel number 55 (or 550, for that matter). **log-prefix**=*PREFIX* diff --git a/lightningd/channel.c b/lightningd/channel.c index 77ac0793f..6601bff79 100644 --- a/lightningd/channel.c +++ b/lightningd/channel.c @@ -211,7 +211,7 @@ struct channel *new_channel(struct peer *peer, u64 dbid, channel->log = new_log(channel, peer->ld->log_book, &channel->peer->id, - "chan #%"PRIu64, + "chan#%"PRIu64, dbid); } else channel->log = tal_steal(channel, log); diff --git a/lightningd/jsonrpc.c b/lightningd/jsonrpc.c index 7fadf8c24..14f27f8aa 100644 --- a/lightningd/jsonrpc.c +++ b/lightningd/jsonrpc.c @@ -902,7 +902,7 @@ static struct io_plan *jcon_connected(struct io_conn *conn, list_head_init(&jcon->commands); /* We want to log on destruction, so we free this in destructor. */ - jcon->log = new_log(ld->log_book, ld->log_book, NULL, "jsonrpc #%i", + jcon->log = new_log(ld->log_book, ld->log_book, NULL, "jsonrpc#%i", io_conn_fd(conn)); tal_add_destructor(jcon, destroy_jcon); diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index 3f74e6475..f9b5c9d25 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -629,7 +629,7 @@ new_uncommitted_channel(struct peer *peer) uc->dbid = wallet_get_channel_dbid(ld->wallet); uc->log = new_log(uc, ld->log_book, &uc->peer->id, - "chan #%"PRIu64, uc->dbid); + "chan#%"PRIu64, uc->dbid); uc->fc = NULL; uc->our_config.id = 0; diff --git a/tests/test_closing.py b/tests/test_closing.py index fef5abf09..ee538e5d0 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -1459,7 +1459,7 @@ def test_permfail_htlc_out(node_factory, bitcoind, executor): l2 = node_factory.get_node(disconnect=disconnects, feerates=(7500, 7500, 7500)) l1.rpc.connect(l2.info['id'], 'localhost', l2.port) - l2.daemon.wait_for_log('openingd-chan #1: Handed peer, entering loop'.format(l1.info['id'])) + l2.daemon.wait_for_log('openingd-chan#1: Handed peer, entering loop'.format(l1.info['id'])) l2.fund_channel(l1, 10**6) # This will fail at l2's end. diff --git a/tests/test_connection.py b/tests/test_connection.py index adda5de6e..8746df34b 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -373,7 +373,7 @@ def test_reconnect_openingd(node_factory): l1.bitcoin.generate_block(3) # Just to be sure, second openingd hand over to channeld. This log line is about channeld being started - l2.daemon.wait_for_log(r'channeld-chan #[0-9]: pid [0-9]+, msgfd [0-9]+') + l2.daemon.wait_for_log(r'channeld-chan#[0-9]: pid [0-9]+, msgfd [0-9]+') @unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1") diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 07252f8d6..15a53202a 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -354,7 +354,7 @@ def test_gossip_weirdalias(node_factory, bitcoind): .format(normal_name)) l1.rpc.connect(l2.info['id'], 'localhost', l2.port) - l2.daemon.wait_for_log('openingd-chan #1: Handed peer, entering loop') + l2.daemon.wait_for_log('openingd-chan#1: Handed peer, entering loop') l2.fund_channel(l1, 10**6) bitcoind.generate_block(6) diff --git a/tests/test_misc.py b/tests/test_misc.py index 77089169d..a97407f14 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1199,7 +1199,7 @@ def test_htlc_send_timeout(node_factory, bitcoind): timedout = False while not timedout: try: - l2.daemon.wait_for_log(r'channeld-chan #[0-9]*: \[IN\] ', timeout=30) + l2.daemon.wait_for_log(r'channeld-chan#[0-9]*: \[IN\] ', timeout=30) except TimeoutError: timedout = True diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 523dcdcd5..cf1bbb10a 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -263,7 +263,7 @@ def test_plugin_connected_hook(node_factory): l1.daemon.wait_for_log(r"{} is in reject list".format(l3.info['id'])) # FIXME: this error occurs *after* connection, so we connect then drop. - l3.daemon.wait_for_log(r"openingd-chan #1: peer_in WIRE_ERROR") + l3.daemon.wait_for_log(r"openingd-chan#1: peer_in WIRE_ERROR") l3.daemon.wait_for_log(r"You are in reject list") def check_disconnect():