RE: Squid and newsyslog

2003-10-07 Thread Barry Byrne
Jason:

I don't use newsyslog to rotate the squid logs but do the following:

Specify the number of logfiles to keep in the squid.conf file:

logfile_rotate  8

Tell squid to do rotate the logs with the command:

/usr/local/squid/sbin/squid -k rotate

You could do this in a short cron job.

 - Barry

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Jason Stewart
 Sent: 07 October 2003 14:06
 To: Free BSD Questions list
 Subject: Squid and newsyslog
 
 
 I'm having trouble rotating my squid access.log and cache.log with 
 newsyslog.
 
 Here is my entry in newsyslog.conf:
 
 /usr/local/squid/logs/access.log nobody.nogroup 644 7 * 168 Z 
 /usr/local/squid/logs/squid.pid
 (ditto, but for cache.log also)
 
 I have the pid file, the mode, user, and group. The new log is created 
 just fine with the correct ownership and permissions and the old one is 
 trimmed, but squid does not actually restart. The new logfile does not 
 get appended to.
 
 For now, I have the newsyslog entry commented out and I'm rotating the 
 log by hand, but sometime I'd like to get it working automatically.
 
 For some reason, newsyslog and squid aren't working well together.
 
 Any ideas?
 
 Thanks,
 Jason Stewart
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Squid and newsyslog

2003-10-07 Thread Dan Nelson
In the last episode (Oct 07), Jason Stewart said:
 I'm having trouble rotating my squid access.log and cache.log with
 newsyslog.
 
 Here is my entry in newsyslog.conf:
 
 /usr/local/squid/logs/access.log nobody.nogroup 644 7 * 168 Z 
 /usr/local/squid/logs/squid.pid

You need to send squid SIGUSR1 (signal 30) to tell it to reopen its
logfiles.  Here's my line:

/usr/local/squid/logs/access.log nobody:wheel 644 7 4  *  ZB /var/run/squid.pid 30

The B flag tells newsyslog not to put a logfile turned over entry at
the top of the file, since squid logs aren't in syslog format.
 
-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]