Increase signal-to-noise ratio in debug.log
by adjusting log level when logging failed non-manual connect()
:s.
Before this patch:
0$ src/bitcoind -printtoconsole
1…
22018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
32018-02-28 18:37:52 connect() 10.11.21.34:18333 failed after select(): Connection refused (111)
42018-02-28 18:43:22 connect() to 10.11.43.14:18333 failed after select(): Network is unreachable (101)
52018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
62018-02-28 18:46:54 connect() to [2001:0:9d38:78ff:1234:1234:1234:1234]:18333 failed: Network is unreachable (101)
72018-02-28 18:48:56 connect() to [2001:0:9d38:6aff:1234:1234:1234:1234]:18333 failed: Network is unreachable (101)
82018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
After this patch:
0$ src/bitcoind -printtoconsole
1…
22018-02-28 18:42:51 UpdateTip: new best=0000000000005448b10a219683d34b770a28044e1cc421032dea1a79ff548948 height=1286903 version=0x20000000 log2_work=69.791313 tx=17408546 date='2018-02-28 18:42:46' progress=1.000000 cache=0.0MiB(173txo)
32018-02-28 18:44:49 UpdateTip: new best=000000000000029a521ff2803e1441b09413b876accff5084a4cccf7747d798b height=1286904 version=0x20000000 log2_work=69.791345 tx=17408559 date='2018-02-28 18:44:51' progress=1.000000 cache=0.1MiB(502txo)
42018-02-28 18:49:11 UpdateTip: new best=000000000000000206b79eb235e5dd907b6369de0e5d764330bf40ec0d460311 height=1286905 version=0x20000000 log2_work=69.791377 tx=17408577 date='2018-02-28 18:49:12' progress=1.000000 cache=1.0MiB(5245txo)
Please note that “manual connect()
:s” (invoked via -connect
, -proxy
or addnode
) are still reported at the default log level as these messages are likely to be relevant to end-users:
0$ src/bitcoind -printtoconsole -connect=127.0.0.1:1234
1…
22018-02-28 18:31:13 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
3
4$ src/bitcoind -printtoconsole -proxy=127.0.0.1:1234
5…
62018-02-28 18:32:32 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)
7
8$ src/bitcoind -printtoconsole &
9$ src/bitcoin-cli addnode 127.0.0.1:1234 onetry
10…
112018-02-28 18:33:40 connect() to 127.0.0.1:1234 failed after select(): Connection refused (111)