Date: Sat, 06 Jul 2002 20:38:26 -0700 From: Doug Barton <DougB@FreeBSD.org> To: Nuno Teixeira <nunotex@pt-quorum.com> Cc: Maxim Konovalov <maxim@FreeBSD.ORG>, freebsd-stable@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/newsyslog newsyslog.c Message-ID: <3D27B7B2.1B8EEE9B@FreeBSD.org> References: <200207011244.g61CiG3Y013597@freefall.freebsd.org> <20020707022423.GA51424@gw.tex.bogus>
next in thread | previous in thread | raw e-mail | index | archive | help
Nuno Teixeira wrote: > Does this mean that now I can use newsyslog to compress apache logs? The problem with newsyslog and things like apache and named is that the process continues writing to the file after you mv it. The proper procedure for such processes is: mv logfile logfile.old hup process (process creates and starts writing to new log) compress logfile.old That way you don't lose anything. Since it's designed to work with syslogd, what newsyslog does is: mv logfile logfile.old (syslogd stops writing to logfile) compress logfile.old create logfile hup syslogd That works fine for syslog, but wreaks havoc with things like apache and named. There is a ${PREFIX}/sbin/rotatelogs script that comes with apache, you should take a look at that and modify it to suit your needs. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D27B7B2.1B8EEE9B>