Hello,
I want rotate my cache_log file (in /var/log/squid/…)
i want rotate when size is 5G and i put in a crontab hourly
i create a conf file who name is “squid_cache” in /etc/logrotate.d/squid_cache
/var/log/squid/cache.log {
rotate 2
size 5G
compress
notifempty
missingok
nocreate
sharedscripts
postrotate
# Asks squid to reopen its logs. (logfile_rotate 0 is set in squid.conf)
# errors redirected to make it silent if squid is not running
/usr/sbin/squid -k rotate 2>/dev/null
# Wait a little to allow Squid to catch up before the logs is compressed
sleep 1
endscript
}
any idea please ?