[CentOS] How to add time to squid log

Les Mikesell lesmikesell at gmail.com
Wed Mar 21 06:34:51 UTC 2007

Indunil Jayasooriya wrote:
> Hi,
> I have the need of adding time to squid log. The commad tail -f
> /var/log/squid/access.log does not provide the time when a user acesses the
> internet.
> I want to enable this feature.
> How to enable ?

The first number in the log is time in seconds since Jan 1, 1970 plus 3 
digits of milliseconds.  Feed it to 'date -r number' to get a more 
readable format.  Perl and most other languages have routines to handle 
timestamps in this format if you need to convert.

   Les Mikesell
    lesmikesell at gmail.com

More information about the CentOS mailing list