We log when we stop having enough dir info, but we never log when we resume having enough
When something goes wrong with our ability to use the network, we get a notice-level log like this one:
Oct 23 05:21:03.818 [notice] Our directory information is no longer up-to-date enough to build circuits: We're missing descriptors for 1/2 of our primary entry guards (total microdescriptors: 6432/6432). That's ok. We will try to fetch missing descriptors soon.
But when things recover, that message is only at info-level:
Oct 23 05:21:04.822 [info] We now have enough directory information to build circuits.
The original plan is described in the comments in update_router_have_minimum_dir_info():
/* a) make us log when we next complete a circuit, so we know when Tor
* is back up and usable, and b) disable some activities that Tor
* should only do while circuits are working, like reachability tests
* and fetching bridge descriptors only over circuits. */
note_that_we_maybe_cant_complete_circuits();
but then we lost that notice-level log in commit eee62e13 (in Tor 0.3.5.1-alpha):
- log_notice(LD_GENERAL,
- "Tor has successfully opened a circuit. "
- "Looks like client functionality is working.");
[...]
+ log_info(LD_GENERAL,
+ "Tor has successfully opened a circuit. "
+ "Looks like client functionality is working.");
as part of the shift in #14950 (closed) to reduce log clutter.
We should make sure there is a corresponding "we're back" message for each "we can't work yet" message that we write.