Search squid archive

Re: Re: Squid + MySQL ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Maxime Gaudreault <mgaudreault@xxxxxxxxxxxxxxx>
> 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


      


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux