Making Squid Log Format Human Readable

Davis
Sep 12, 2022

--

Squid access log can be customized based on your preference.
By default it uses epoch time format.

access.log

What we want to do is change it to human readable localtime. To do this you will need to edit squid configuration file.

sudo vi /etc/squid/squid.conf

Add lines below and save it by pressing colon `:` followed by `wg` and enter.

logformat custom %tl.%03tu %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mtaccess_log daemon:/var/log/squid/access.log custom

Restart squid to apply changes.

sudo systemctl restart squid
access.log in human readable local time

Further configuration can be found at: squid : logformat configuration directive (squid-cache.org)

--

--

Davis
Davis

Written by Davis

0 Followers

Loves tech and movies.

No responses yet