ranj Posted April 16, 2008 Posted April 16, 2008 Apoloiges I should have put this on my previous post which is to do with Squid. This question isn't really a problem its more of how we could do it We have noticed that in var/log/squid that we have all the logs for access to the internet by all users in school. This is very handy but at the moment we find it stores 7 days worth of usage in 1 log file. Is there a way we can create a log file for each day rather than 1 log for 7 days and also ask it to delete old log files in the process? Thanks
kmount Posted April 16, 2008 Posted April 16, 2008 I noted you mentioned Gentoo on another post so this may be relevant. logrotate can be used in this instance. Check the bottom of this link for info on how to give it a go. Probably not for the feint hearted unless you've got a good backup/linux techy.
Geoff Posted April 16, 2008 Posted April 16, 2008 Here's my logrotate config for squid (stock Debian, but tweaked to keep 4 weeks worth). # # Logrotate fragment for squid. # /var/log/squid/*.log { daily compress delaycompress rotate 28 missingok create 644 proxy proxy 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 }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now