diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-08-30 21:12:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-08-30 21:12:34 +0000 |
commit | 5da6321b762d090b9c4917de9c55f284c4881d0c (patch) | |
tree | 857c9106b1238f4c9b8e7f1a7930a26c28190401 | |
parent | ca24362cf86bfdb5d13e73f65d551d389b4ab859 (diff) | |
download | tor-5da6321b762d090b9c4917de9c55f284c4881d0c.tar tor-5da6321b762d090b9c4917de9c55f284c4881d0c.tar.gz |
r14859@catbus: nickm | 2007-08-30 17:10:15 -0400
0-pad minutes and seconds when displaying weighted mtbf in info logs.
svn:r11324
-rw-r--r-- | doc/TODO | 2 | ||||
-rw-r--r-- | src/or/rephist.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -41,7 +41,7 @@ Things we'd like to do in 0.2.0.x: - Tor logs the libevent version on startup, for debugging purposes. This is great. But it does this before configuring the logs, so it only goes to stdout and is then lost. - - Aug 30 16:57:41.196 [info] OR (unknown) [8DEF1682406EDE71479E98A4AEB1F27829911106]: 11/141 good connections; uptime 6748/319666 sec (2.11%); wmtbf 4:6:16 + o Aug 30 [...] wmtbf 4:6:16 The wmtbf time value is missing some zero-pads. - Proposals: diff --git a/src/or/rephist.c b/src/or/rephist.c index 72a7af583..e7110f7de 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -469,7 +469,7 @@ rep_hist_dump_stats(time_t now, int severity) } log(severity, LD_GENERAL, "OR %s [%s]: %ld/%ld good connections; uptime %ld/%ld sec (%.2f%%); " - "wmtbf %lu:%lu:%lu", + "wmtbf %lu:%02lu:%02lu", name1, hexdigest1, or_history->n_conn_ok, or_history->n_conn_fail+or_history->n_conn_ok, upt, upt+downt, uptime*100.0, |