]> git.ipfire.org Git - thirdparty/squid.git/commit
Add timestamps to (most) FATAL messages (#179) M-staged-PR179
authorChristos Tsantilas <christos@chtsanti.net>
Sat, 14 Apr 2018 02:14:46 +0000 (02:14 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 16 Apr 2018 06:38:59 +0000 (06:38 +0000)
commite863656d60bb8de2ea7f81e0907def276b861a97
tree64574da3154e400270678ec9abd112c80a7403b1
parent244da4ad90720f8ca2229c9adc2bbd3ce87a8e7e
Add timestamps to (most) FATAL messages (#179)

Reliable timestamp information is often critical for triage. We can use
the existing debugs() interface to add timestamps to FATAL messages. The
affected code already calls such risky functions as
storeDirWriteCleanLogs() so calling debugs() instead of printing
directly to files/syslog should not make things worse.

FATAL messages that were also logged to syslog (at LOG_ALERT level) are
still logged to syslog (at that same level, but now with the usual
Squid-generated prefix). Such syslog alerts can now be easily triggered
via a new ForceAlert() API.

Also treat segmentation faults, bus errors, and other signal-based
sudden deaths the same as most other FATAL errors -- log them to syslog.

This is a Measurement Factory project.
src/Debug.h
src/debug.cc
src/fatal.cc
src/tests/stub_debug.cc
src/tools.cc