Re: [squid-users] LogFormat Question squid 2.6_Stable2

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 01 Aug 2006 08:22:00 +0200

mån 2006-07-31 klockan 14:48 -0300 skrev Pablo García:
> Hi, I'd like to know if there's any way to change the datetime format
> for the %tl directive within the LogFormat configuration option.
> I need to log this format "%Y/%b/%d %H:%M:%S", is there any env
> variable, configuration option or compilation directive to achive this
> ?

From squid.conf:

                tl Local time. Optional strftime format argument
                        default %d/%b/%Y:%H:%M:%S %z

and the generic format code syntax description a few lines up:

                % ["|[|'|#] [-] [[0]width] [{argument}] formatcode

                " output in quoted string format
                [ output in squid text log format as used by log_mime_hdrs
                # output in URL quoted format
                ' output as-is

                - left aligned
                width field width. If starting with 0 then the
                        output is zero padded
                {arg} argument such as header name etc

So %{%Y/%b/%d %H:%M:%S}tl

should give the format you desire.

Regards
Henrik

Received on Tue Aug 01 2006 - 00:22:07 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:01 MDT