On Mon, 7 Sep 2009 12:54:58 -0500, "SecureSoft - Daniel Merino"
<listascorreo_at_securesoft.com.pe> wrote:
> Hi everyone,
> I just found the solution and it works. There is a line in the squid.conf
> that starts with "logformat" that says:
>
> logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A
%mt
>
> and you have to change the "%ts.%03tu" with "%tl" for local time or "%tg"
> fro GMT time. Ending with:
>
> logformat squid %tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
>
> If you dont have this line you can add it and the result will be the log
> with a time readable.
Yes that is the purpose of logformat. However its advisable to change the
format name away from the default name "squid". It will not always be
replaceable.
Also note for others:
Using a custom log may make it unreadable to many log processing tools.
Using local-time as demonstrated above instead of universal time
(pseudo-GMT) will encounter random time-travel variations from system
tzdata updates.
Amos
>
> Thanks for been answering
>
> Hasta luego.
>
> Daniel Merino
> Consultor Junior en Seguridad Informática
> Secure Soft S.A.C.
> C Begonias 630-656
> Oficina 14 (Segundo Piso)
> San Isidro. Lima27 - PERU
> (511) 994622555 (RPC)
> (511) 4402031 (TeleFax)
> + dmerino_at_securesoft.com.pe
> : http://www.securesoft.com.pe
>
>
> -----Mensaje original-----
> De: Tim Duncan [mailto:Tduncan_at_imcpl.org]
> Enviado el: Viernes, 04 de Septiembre de 2009 01:51 p.m.
> Para: SecureSoft - Daniel Merino; squid-users_at_squid-cache.org
> Asunto: RE: [squid-users] Access.log time
>
>
>
>
>>Hi everyone,
>>Im looking how to change the time that appears in the access.log to
> make it friendlier. Where can I change the code to do it? Thanks for
> answering
>
>
>
> A shell script:
>
> $ cat squidtime.sh
> #!/bin/sh
>
> perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'
>
>
> This lets me do:
>
> $ cat access.log | squidtime.sh | less
>
>
>
>
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 4396 (20090904) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 4403 (20090907) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
Received on Mon Sep 07 2009 - 22:48:20 MDT
This archive was generated by hypermail 2.2.0 : Fri Sep 18 2009 - 12:00:03 MDT