mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Merge branch 'tor-gitlab/mr/228'
This commit is contained in:
commit
e4e88c4b2e
4
changes/ticket40182
Normal file
4
changes/ticket40182
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor features(logging):
|
||||||
|
- If a channel has never received, transmitted a cell or seen a client,
|
||||||
|
do not calculate time diffs against 1/1/1970 but log another prettier message
|
||||||
|
Fixes 40182
|
@ -2629,24 +2629,42 @@ channel_dump_statistics, (channel_t *chan, int severity))
|
|||||||
circuitmux_num_circuits(chan->cmux) : 0);
|
circuitmux_num_circuits(chan->cmux) : 0);
|
||||||
|
|
||||||
/* Describe timestamps */
|
/* Describe timestamps */
|
||||||
|
if (chan->timestamp_client == 0) {
|
||||||
|
tor_log(severity, LD_GENERAL,
|
||||||
|
" * Channel %"PRIu64 " was never used by a "
|
||||||
|
"client", (chan->global_identifier));
|
||||||
|
} else {
|
||||||
tor_log(severity, LD_GENERAL,
|
tor_log(severity, LD_GENERAL,
|
||||||
" * Channel %"PRIu64 " was last used by a "
|
" * Channel %"PRIu64 " was last used by a "
|
||||||
"client at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
"client at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
||||||
(chan->global_identifier),
|
(chan->global_identifier),
|
||||||
(uint64_t)(chan->timestamp_client),
|
(uint64_t)(chan->timestamp_client),
|
||||||
(uint64_t)(now - chan->timestamp_client));
|
(uint64_t)(now - chan->timestamp_client));
|
||||||
|
}
|
||||||
|
if (chan->timestamp_recv == 0) {
|
||||||
|
tor_log(severity, LD_GENERAL,
|
||||||
|
" * Channel %"PRIu64 " never received a cell",
|
||||||
|
(chan->global_identifier));
|
||||||
|
} else {
|
||||||
tor_log(severity, LD_GENERAL,
|
tor_log(severity, LD_GENERAL,
|
||||||
" * Channel %"PRIu64 " last received a cell "
|
" * Channel %"PRIu64 " last received a cell "
|
||||||
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
||||||
(chan->global_identifier),
|
(chan->global_identifier),
|
||||||
(uint64_t)(chan->timestamp_recv),
|
(uint64_t)(chan->timestamp_recv),
|
||||||
(uint64_t)(now - chan->timestamp_recv));
|
(uint64_t)(now - chan->timestamp_recv));
|
||||||
|
}
|
||||||
|
if (chan->timestamp_xmit == 0) {
|
||||||
|
tor_log(severity, LD_GENERAL,
|
||||||
|
" * Channel %"PRIu64 " never transmitted a cell",
|
||||||
|
(chan->global_identifier));
|
||||||
|
} else {
|
||||||
tor_log(severity, LD_GENERAL,
|
tor_log(severity, LD_GENERAL,
|
||||||
" * Channel %"PRIu64 " last transmitted a cell "
|
" * Channel %"PRIu64 " last transmitted a cell "
|
||||||
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
"at %"PRIu64 " (%"PRIu64 " seconds ago)",
|
||||||
(chan->global_identifier),
|
(chan->global_identifier),
|
||||||
(uint64_t)(chan->timestamp_xmit),
|
(uint64_t)(chan->timestamp_xmit),
|
||||||
(uint64_t)(now - chan->timestamp_xmit));
|
(uint64_t)(now - chan->timestamp_xmit));
|
||||||
|
}
|
||||||
|
|
||||||
/* Describe counters and rates */
|
/* Describe counters and rates */
|
||||||
tor_log(severity, LD_GENERAL,
|
tor_log(severity, LD_GENERAL,
|
||||||
|
Loading…
Reference in New Issue
Block a user