| Dieser Inhalt in deutsch |

Debian - Proxy Server Squid - Log with date and time

I used Debian Lenny and Squid 2.6.Stable5

Problem

In the logfile /var/log/squid/access.log is no informtion about time and date.

Solution

Go to /etc/squid.conf and look for a part like this. I changes '%ts' to '%tl'.

#logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
logformat squid %tl.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
#logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
#logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
#logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh

Let changes take effect

Reload the configuration.

# /etc/init.d/squid reload

You see

23/Aug/2009:11:22:33:44 [...]