Linux – Date time in access.log file

linuxPROXYsquidtime

Hai,

  • How can i add human date and time format in squid access.log file?
  • What change i want to make in squid.conf file ?
  • I want that my log file will update with normal date and time format , How can i do it ?
  • If i use tail comment to view log file , i want to get human date and time format. What i want to do for this ?

Best Answer

Something like

perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e' < access.log

could help you with the last part (tail-ing the log). Found it on a Squid mailing list.

Related Topic