multi-network: scenario log messages need to indicate which network they are running in
Closed this issue · 6 comments
Ive got three warnets running, each with ln_init
and its hard to tell in the logs where they are all in the process
│ 2024-04-19T17:18:46+0000 - INFO - Waiting for funds to be spendable: 173 BTC each for 50 LN nodes │
│ 2024-04-19T17:19:19+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, │
│ 2024-04-19T17:19:31+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49] │
│ 2024-04-19T17:19:47+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47] │
│ 2024-04-19T17:19:59+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [7, 15, 23, 31, 39, 47] │
│ 2024-04-19T17:20:05+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [15, 31, 47] │
│ 2024-04-19T17:20:12+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [31] │
│ 2024-04-19T17:20:17+0000 - INFO - Adding p2p connections to LN nodes │
│ 2024-04-19T17:21:22+0000 - DEBUG - {'jsonrpc': '2.0', 'method': 'scenarios_list_running', 'id': 1} │
│ 2024-04-19T17:21:37+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, │
│ 2024-04-19T17:22:37+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49] │
│ 2024-04-19T17:23:10+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47] │
│ 2024-04-19T17:23:11+0000 - DEBUG - {'jsonrpc': '2.0', 'method': 'scenarios_list_running', 'id': 1} │
│ 2024-04-19T17:23:26+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [7, 15, 23, 31, 39, 47] │
│ 2024-04-19T17:23:39+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [15, 31, 47] │
│ 2024-04-19T17:23:50+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [31] │
│ 2024-04-19T17:23:58+0000 - INFO - Adding p2p connections to LN nodes │
│ 2024-04-19T17:25:02+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, │
│ 2024-04-19T17:25:53+0000 - DEBUG - {'jsonrpc': '2.0', 'method': 'scenarios_list_running', 'id': 1} │
│ 2024-04-19T17:26:26+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49] │
│ 2024-04-19T17:27:11+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47] │
│ 2024-04-19T17:27:14+0000 - DEBUG - {'jsonrpc': '2.0', 'method': 'scenarios_list_running', 'id': 1} │
│ 2024-04-19T17:27:40+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [7, 15, 23, 31, 39, 47] │
│ 2024-04-19T17:27:54+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [15, 31, 47] │
│ 2024-04-19T17:28:11+0000 - INFO - Waiting for all LN nodes to have URI, LN nodes remaining: [31] │
│ 2024-04-19T17:28:23+0000 - INFO - Adding p2p connections to LN nodes │
│
I wasn't able to reproduce your exact logging scenario, but I wonder if plugging the network name into the logger would help show where each line belongs: main...mplsgrant:warnet:2024-04-logging-test-framework
@mplsgrant yeah i think its as easy as that. lets add a (k8s only) test that deploys two networks, it might not be possible with our current test_base
but we should cover it
@pinheadmz I tried contorting the test_base to handle two networks, and you can see the progress here: main...mplsgrant:warnet:2024-04-logging-test-framework
May take another swing at it in the coming days.
After looking at this, I am happy to go with the simple update of the logger function (fmt=f"{self.options.network} - %(message)s"
) for now, and then revisit expanding the testing functionality when I have more time.
After looking at this, I am happy to go with the simple update of the logger function (
fmt=f"{self.options.network} - %(message)s"
) for now, and then revisit expanding the testing functionality when I have more time.
yeah i think that's all we need to do. bonus points, have scenarios include their own name in there as well, ie:
INFO - test-network-1 - ln_init - Waiting for all LN nodes to have URI, LN nodes remaining: [31]
no longer applies