Now with Squid v3.x, you can choose your logging format, and you can log different detail to different logs. Great!
In your squid.conf file, add the following:
- # log formats
access_log /usr/local/squid/var/logs/access.log squid
access_log /usr/local/squid/var/logs/access-GMTtime.log customformat
logformat customformat %tg.%03tu response:%tr %>a server:%Hs size:%
The line "# log formats" just tells the reader of the config file, most likely you but you never know, that this bit is to set log file options.
The next line tells squid to log in the old Squid manner, and default details.
The third line tells squid that you want to do something custom: we tell squid to also log to an additional log "access-localtime.log".
The final line defines the options we want. My example uses options chosen pretty much the old defaults details, but using GMT for human readable date / time, and I added some of the new options. For a full list consult the squid manual.
No comments:
Post a Comment