Squid: readable time format in log

Change the time & date log format For Squid.

From: 1295723692.628 24 192.168.200.6 TCP_MISS/200 3505 GET https://web.archive.org/web/20130823023017/http://i3.ytimg.com/vi/ru8ddkzOFUI/default.jpg – DIRECT/74.125.79.101 image/jpeg

To: 22/Jan/2011:20:48:17 +0100.079 40 192.168.200.6 TCP_MISS/304 353 GET https://web.archive.org/web/20110124082452/http://s.ytimg.com/yt/cssbin/www-embed-vfl0GVaH1.css – DIRECT/74.125.79.101 –

In the Squid config comment all “logformat” lines, and add:

logformat squid %tl.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt

FYI; Default is:

logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt

Posted by

in

,

Comments

Leave a Reply…