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

Re: [SLUG] Problem with logrotate and squid logs



On Thu, Jun 14, 2001 at 06:13:46PM +1000, MacKenzie, Chris J wrote:

> I can't seem to get logrotate in RH 7.0 to behave properly with my squid
> logs. I tried to use the prerotate statement to use squids built-in log
> rotation function, but alas I just can't seem to get it right.

Looks like you didn't install Redhat's squid rpm otherwise you'd have
it all setup properly.  It may be that you need `postrotate', not
`prerotate'.  Here's my /etc/logrotate.d/squid which works:

/var/log/squid/access.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
}
/var/log/squid/cache.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
}

/var/log/squid/store.log {
    weekly
    rotate 5
    copytruncate
    compress
    notifempty
    missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
    postrotate
      /usr/sbin/squid -k rotate
    endscript
}


Cheers,

John
-- 
OTOH, if she could spell she'd be able to use a CLI and not be
GUI-dependent and wouldn't have had to become an MCSE.  Such a tragedy
when you don't make sure your kids learn in school, really.
            -- Anthony de Boer

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug