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:
Nick Mathewson
2011-05-15 21:58:46 -04:00
parent ede102fd46
commit b95dd03e5f
15 changed files with 269 additions and 93 deletions
+2 -2
View File
@@ -274,8 +274,8 @@ command_process_create_cell(cell_t *cell, or_connection_t *conn)
cell->circ_id, (int)(time(NULL) - conn->_base.timestamp_created));
if (router)
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"Details: nickname \"%s\", platform %s.",
router->nickname, escaped(router->platform));
"Details: router %s, platform %s.",
router_describe(router), escaped(router->platform));
return;
}