[afnog] Squid Log Files

Mark Tinka mtinka at africaonline.co.zw
Thu Aug 3 08:23:45 SAST 2006


On Wednesday 02 August 2006 17:09, Stephane Bortzmeyer wrote:

> Debian uses logrotate, like many Unix. The package should put
> a configuration file in /etc/logrotate.d (Squid does it). If
> it does not, do it yourself. For the record, here is the one
> for Squid on my Debian machines:
>
> /var/log/squid/*.log {
>         daily
>         compress
>         delaycompress
>         rotate 2
>         missingok
>         nocreate
>         sharedscripts
>         prerotate
>                 test ! -x /usr/sbin/sarg-maint ||
> /usr/sbin/sarg-maint endscript
>         postrotate
>                 test ! -e /var/run/squid.pid ||
> /usr/sbin/squid -k rotate endscript
> }

While using the UNIX Logrotate facility is definitely the most 
elegant approach (and as Stephane says, some Linux distributions 
actually automatically configure this for Squid when it's 
installed from RPM), Squid also has its own log rotation 
utility.

In the 'squid.conf', you'll find a tag 'logfile_rotate', whose 
value can be set to '0' to disable and '1' to enable. When 
enabled, you can run the 'squid -k' command to rotate Squid log 
files.

You can find more documentation on this feature in the 
'squid.conf' file under 'TAG: logfile_rotate'.

But for all intents and purposes, I'd recommend, as does 
Stephane, the UNIX Logrotate facility.

Cheers,

Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://listserv2.cfi.co.ug/pipermail/afnog/attachments/20060803/2c8a2ada/attachment.bin


More information about the afnog mailing list