Squid Access Logs date wise
I am using Squid 2.6 on RHEL 5. I want a separate access log everyday to be created automatically instead of one big access.log file in /var/log/squid
Is there a way to do this editing the /etc/squid/squid.conf file? Thanks in advance. |
You can use logrotate to do this (are you using it for other log files)? You can create an entry for squid in /etc/logrotate.d/squid and add the following content. This example rotates weekly for 5 weeks. The postrotate entry of /usr/local/squid/sbin/squid -k rotate causes squid to close and re-open its logs so no silliness happens with open file handles For this to happen, your squid.conf file needs to have logfile_rotate set to 0:
Code:
/var/log/squid/access.log { |
All times are GMT -5. The time now is 11:58 PM. |