From: Maxime Gaudreault <mgaudreault_at_reference.qc.ca>
> Are you sure it works well with log rotation ?
> The script tail /var/log/squid3/access.log but after the log rotation
> access.log doesn't exist anymore. It's named access.log.1 instead so the
> script crashes because access.log is no longer there.
> So I change access.log to access.log.1 in the script. But after a reboot
> it's access.log again so the script doesn't works...
> Any hint ?
You don't have this in your '/etc/logrotate.d/squid'
postrotate
/usr/sbin/squid -k rotate
This tells squid to close the current log file (renamed to 'access.log.1' by logrotate) and open a new one (named 'access.log')...
From the doc: "If the file does not get altered for a while, File::Tail gets suspicious and startschecking if the file was truncated, or moved and recreated."
So the script should switch to the new access.log file after a while...
JD
Received on Wed Aug 05 2009 - 15:43:39 MDT
This archive was generated by hypermail 2.2.0 : Wed Aug 05 2009 - 12:00:03 MDT