syslog support

From: Tito Flagella <tito@dont-contact.us>
Date: Tue, 10 Dec 2002 18:06:31 +0100

I'm enclosing a patch for better syslog support in squid. The patch is
for a squid-2.4.STABLE7 release. If needed, I can eventually produce the
patch for more recent releases.

The patch consists in support for an optional parameter to the '-s'
option. If you don't specify any value for the 's' option, the behaviour
is the same it was before. Setting "-s2", all other logs are sent to
syslog, as LOG_INFO, while debug logs continue to be sent as LOG_WARNING
or LOG_NOTICE. To let programs to recollect useful data (eg. for access
statistics), a string identifying the log-type is prepended to the usual
squid output (access, store or logs)

Here is an example of use:

    squid -s2 -D

Sample syslog output:

Dec 10 16:49:48 impresario squid[14271]: idnsSendQuery: FD 5: sendto:
(101) Network is unreachable
Dec 10 16:49:48 impresario squid[14271]: WARNING: redirector #1 (FD 7)
exited
Dec 10 16:49:53 impresario squid[14271]: idnsCheckQueue: ID 2: giving up
after 1 tries and 5.1 seconds
Dec 10 16:49:53 impresario squid[14271]: access 1039535393.664 5070
127.0.0.1 TCP_MISS/503 1084 GET http://localhost/root/tel - NONE/- -
Dec 10 16:49:53 impresario squid[14271]: store 1039535393.664 RELEASE -1
FFFFFFFF 10A653A45766F80D57EA20E7B6D4ED8D 503 -1 -1 -1

Hope it helps,

tito.
Received on Tue Dec 10 2002 - 10:27:21 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:00 MST