Re: [squid-users] logformat emulate_httpd_log

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 15 Nov 2012 03:14:17 +1300

On 14/11/2012 10:38 p.m., Alexandre Chappaz wrote:
> Hi,
>
> I am looking for some precision on the %>st in the log format directive.
> with squid 2.6, I used to set
>
> emulate_httpd_log on
>
> In order to have the useragent and referer I commented this line out
> and used instead the combined format as defined here :
>
> logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
> "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
>
>
> This is messing up with the scripts I have for parsing the logfiles in
> the sense that %Hs and %<st now report '-' character when I was
> expecting a '0' with the emulate_httpd_log on.
>
> Is there a way to turn these 2 fields back to the emulate_httpd_log behavior?

If you use the built-in format named "combined" you should be getting
the actual Apache defined values for each field.

If you defined your own "logformat combined ..." you will get the Squid
range of values where '-' is displayed for no-value in a field.

Amos
Received on Wed Nov 14 2012 - 14:14:31 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 14 2012 - 12:00:04 MST