Re: [SQU] time format in squid logs

From: Leonardo Rodrigues <coelho@dont-contact.us>
Date: Fri, 02 Feb 2001 16:43:58 -0300

At 14:48 02/02/01 +0000, hillel@iafrica.com wrote:

>Squid lists the various log events as 981124662.933 and then 981125393.936
>later. How can I get squid to put the time in a usable format when each log
>event happened?

         Seems that log cannot be generated with human readable timestamp.
But you can convert it anytime you want ...

         Create a simple script and chmod +x it

#!/bin/sh
perl -nle '@x = split " ", $_, 2; print scalar localtime $x[0], " $x[1]";'

         Then, pipe access.log to it !

         cat /var/log/squid/access.log | /path/to/script/script.pl

         And we've got human readable timestamps !!!

Sun Jan 28 05:24:07 2001 111 200.x.x.x TCP_MISS/200 1632 GET
http://www.targard.com.br/index_r07_c04_f4.gif - DIRECT/www.targard.com.br
image/gif
Sun Jan 28 05:24:07 2001 122 200.x.x.x TCP_MISS/200 1700 GET
http://www.targard.com.br/index_r07_c04_f3.gif - DIRECT/www.targard.com.br
image/gif

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Fri Feb 02 2001 - 11:54:31 MST

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