Hello,
I noticed that logs in /var/log/c-icap do not get rotated. So i prepared logrotate script.
Well it is based on logrotate script from squid. here it is:
#
# Logrotate fragment for c-icap.
#
/var/log/c-icap/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
postrotate
test ! -e /var/run/c-icap/c-icap.pid || echo -n "reconfigure" > /var/run/c-icap/c-icap.ctl
endscript
}
Please include it in the package.
Regards
Vladislav Kurz
I have to extend mu own bug report. My logrotate script seems to fail. Log is rotated once, but the reconfigure request is with this error in server.log: Wed Jan 23 10:18:43 2013, general, A reconfigure pending. Ignoring reconfigure request..... And c-icap continues to log in the rotated log file which then grows indefinitely. Restarting c-icap is not a good solution either. It happened to me, that the restart failed, I had to kill -9 c-icap and start it again, and in the meantime squid stopped working as well because of lost communication with c-icap. So it seems that there is something wrong with handling reconfigure requests and restarts.
Hi,
I noticed since this bug was reported, logrotate script is still
missing. One of my customers claims me a c-icap log file of ~ 18G !!
So here is the logrotate file I used for him:
/var/log/c-icap/*.log {
daily
missingok
notifempty
size 1M
rotate 30
compress
delaycompress
create 644 c-icap nogroup
copytruncate
maxage 30
}
Maybe some tuning is needed, but it works.
Inspired from this french documentation:
http://medias.coutances.educagri.fr/proc%C3%A9dures/Administrateur/Anti-virus_proxy.pdf
Thx,