mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Log descriptions of nodes, not just nicknames.
This patch introduces a few new functions in router.c to produce a more helpful description of a node than its nickame, and then tweaks nearly all log messages taking a nickname as an argument to call these functions instead. There are a few cases where I left the old log messages alone: in these cases, the nickname was that of an authority (whose nicknames are useful and unique), or the message already included an identity and/or an address. I might have missed a couple more too. This is a fix for bug 3045.
This commit is contained in:
@@ -1210,7 +1210,8 @@ router_parse_list_from_string(const char **s, const char *eos,
|
||||
prepend_annotations);
|
||||
if (router) {
|
||||
log_debug(LD_DIR, "Read router '%s', purpose '%s'",
|
||||
router->nickname, router_purpose_to_string(router->purpose));
|
||||
router_describe(router),
|
||||
router_purpose_to_string(router->purpose));
|
||||
signed_desc = &router->cache_info;
|
||||
elt = router;
|
||||
}
|
||||
@@ -2488,7 +2489,7 @@ networkstatus_verify_bw_weights(networkstatus_t *ns)
|
||||
}
|
||||
} else {
|
||||
log_warn(LD_BUG, "Missing consensus bandwidth for router %s",
|
||||
rs->nickname);
|
||||
routerstatus_describe(rs));
|
||||
}
|
||||
} SMARTLIST_FOREACH_END(rs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user