Pages

Tuesday, November 19, 2013

Convert Time stamp from UNIX to Human readable format in SQUID Proxy Log

I work with an IT organization and my Security team as a part of their routine audits asked me to provide the SQUID proxy server log. I have provided them the logs but they were not happy about it since the time stamp in the log is in UNIX format. So they have assigned me the task to change the time stamp to human readable format.

I have started to do the R&D on how this can be achieved, after I googling for a long time I have found the solutions for it which I am explaining now since I have found many administrators searching for this configuration on the internet.

The configuration is pretty simple, we just need to add the following configuration line at the end of squid configuration file located at /etc/squid/squid.conf

The configuration is

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


after adding the above configuration, restart the SQUID proxy server for the changes to take effect.

That's it now the time stamp in SQUID log would be in Human Readable Format.

No comments:

Post a Comment