Squid: readable time format in log

Change the time & date log format For Squid.

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

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

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




Leave a Reply…