]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix milliseconds in certain cache.log messages (#1167)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Wed, 19 Oct 2022 12:52:47 +0000 (12:52 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 21 Oct 2022 12:57:18 +0000 (12:57 +0000)
commit57e7bd5793a4b687382eb9163dd05c63c2e095ad
tree95b9a3a9a44ee8260ed1d7a3ce4a83c91b12143b
parent85de45ebcdd867d95a7c94ddc51e55b7b39ea685
Fix milliseconds in certain cache.log messages (#1167)

This change fixes two bugs:

1. The milliseconds part of an early message time was wrong because
   debugLogTime() got it from the current_time global instead of the
   saved message timestamp. This problem probably affected only early
   saved messages in rare situations where current_time was updated
   between message creation and message writing. This fix adjusts
   DebugMessageHeader::timestamp to store message time with microsecond
   precision.

2. Level-0/1 messages that followed same-second level-2+ messages were
   logged with an unwanted (and stale) milliseconds value. This fix
   forces a reset of the message line format buffer in relevant cases.
src/debug/debug.cc
src/tests/stub_debug.cc