Subject: Re: Log rotation
To: john heasley <heas@shrubbery.net>
From: Eric Haszlakiewicz <erh@jodi.nimenees.com>
List: current-users
Date: 02/18/2005 18:44:31
On Fri, Feb 18, 2005 at 03:16:23PM -0800, john heasley wrote:
> Fri, Feb 18, 2005 at 03:44:55PM -0700, Rick Kelly:
> > Jeremy C. Reed said:
> >
> > >newsyslog does the signal before it compresses the newly rotated file (and
> > >after it creates new log file).
> >
> > Back when www.rmkhome.com was running on NetBSD 1.4, I tried to use newsyslog
> > to rotate the apache logs files. I found that it would rotate the files once,
> > create the new empty log files, but apache would be logging to the old file
> > descriptors, and nothing would get logged until I restarted apache. Has this
>
> Wouldn't you rather just copy and truncate the log file? I suggested such
> a feature for newsyslog, but given timing there is a chance that some
> messages could be missed. Andrew Brown suggested cronolog as a better
> solution for such log files.
um.. it seems to me that copy+truncate would be a lot more vulnerable to
that. i.e.:
copy log
message gets logged
truncate log
resulting in the last message being lost.
eric