Combined Logfile Format

From: Tony Demark <tony@dont-contact.us>
Date: Tue, 25 Nov 1997 09:52:32 -0500

I would like squid to generate logfiles in Combined Logfile Format (Common Logfile Format + Referrer + UserAgent). So far, attempts to patch the source have resulted in core dumps a) immediately or b) after 10 or 15 minutes.

I figure the patch needs to go in icp.c . Right now, I do the following there:
(Warning: I am not a good C programmer)

/* Near the top, right after all the comments and include */
static char ua[1024];

/* In icpStateFree definitions */
const char *uatemp = NULL;

/* In icpStateFree, in 'if', right before log_append call */
uatemp = mime_get_header(icpState->request_hdr, "User-Agent");
sprintf(ua, "%s", uatemp);

/* In icpStateFree, in call to log_append */
// icpState->request_hdr,
// icpState->reply_hdr,
            mime_get_header(icpState->request_hdr, "Referer"),
            ua,

Suggestions on what to do to make this work correctly?

- Tony
Received on Tue Nov 25 1997 - 07:01:19 MST

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