Before eae193e750235e4023b3e6313284eede2cd7a022, Connect() only started the connection and returned true. If tor wasn't running the refusal was reported later and only logged under -debug=tor. Since eae193e750 (in v32), every failed reconnect attempt logs:
2026-11-04T14:14:08Z connect() to 127.0.0.1:9051 failed after wait: Connection refused (111)
2026-11-04T14:14:08Z [warning] tor: Error connecting to address 127.0.0.1:9051
2026-11-04T14:14:08Z [warning] tor: Initiating connection to Tor control port 127.0.0.1:9051 failed
On a default configured node without tor, this pollutes debug.log with 18 lines every hour.
This makes the following improvements:
- Log connection failures as warning if tor config is explicit set (
-torcontrol,-torpasswordor-listenonion), otherwise at debug level. - Log at info level when an active onion service is lost.
- Log info at the first tor connection failure if no tor config is explicit set.
The first two commits are from @fjahr.