[ale] Cooperating with logrotate
Chris Fowler
cfowler at outpostsentinel.com
Fri Nov 6 15:12:59 EST 2009
On Fri, 2009-11-06 at 12:09 -0700, JK wrote:
> Scott McBrien wrote:
> > Check out the logrotate for httpd in /etc/logrotate.d, it sounds like
> > what you need is a post rotate script like what apache uses.
>
>
> Ah. I think that works because when httpd receives a HUP its signal-
> handler rewinds the logfile. I can do that, though unfortunately
> it will require a new release of my server code. Oh well, them's
> the breaks.
Curtis Mayfield (?)
Here is how I handle it in all my programs that log. I had a similar
issue where logrotate would create "holes".
pseudo
log() {
open file in append mode
write log messages
close file
return
}
log("Program starting\n");
More information about the Ale
mailing list