[PATCH] log error details

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Mon, 11 Oct 2010 11:56:29 +0300

The attached patch logs additional error details. It is an updated and
improved version of the patch posted by Alex in squid-dev 2-3 months
before. The corresponding squid-dev thread is "explaining internal errors".

the "err_code" log format code which logs the ID of the error response
served by squid and the "err_detail" which logs additional error
informations, like a reason of the error, a syslog error code, or an
exception ID.

Also includes script utilities to allow developers find the exact
position of the caught exceptions.

Example log entries in access log file:

::1 ... ERR_ICAP_FAILURE/ICAP_XACT_OTHER 500 ...
::1 ... ERR_ICAP_FAILURE/ICAP_XACT_START 500 ...
::1 ... ERR_ICAP_FAILURE/EXCEPTION_START=198258959 500 ...
::1 ... ERR_CONNECT_FAIL/SYSERR=110 200 ...
::1 ... ERR_ICAP_FAILURE/EXCEPTION_START=198258211 500 ...

To search the position of the exceptions caught on the above logs
# ./scripts/calc-must-ids.sh 198258959
./src/adaptation/icap/ModXact.cc:863: 198258959
Must(state.allowedPostview206);

# ./scripts/calc-must-ids.sh 198258211
./src/adaptation/icap/ModXact.cc:115: 198258211 throw TexcHere("ICAP
service is unusable");

Please see patch preamble for more information.

Received on Mon Oct 11 2010 - 08:56:41 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 13 2010 - 12:00:04 MDT