Re: Combined Logfile Format

From: Marc Delisle <[email protected]>
Date: Tue, 25 Nov 1997 11:28:19 -0500

Tony Demark wrote:
>
> 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

I don't know if it can help you, but the pwebstats package
contains a squid2common perl script that converts squid logs
to common log format.

-- 
Marc Delisle                              
Service Informatique                              
Coll�ge de Sherbrooke      
Qu�bec.  819/564-6223
Received on Tue Nov 25 1997 - 08:31:03 MST

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