[nsd-users] Log file rotation

Shane Kerr shane at ca.afilias.info
Fri Nov 7 10:27:17 UTC 2008


Matthijs,

When NSD starts and you have a "logfile:" line in your nsd.conf, like
this:

server:
    logfile: /var/my/special/logfile

This file is opened when NSD starts, and whenever log_msg() is invoked
then the log message is written to the end from log_file().

It would be nice if there was a way to tell NSD, "please re-open this
file". That way one can do:

      * Move current log file to a new name, like "mv nsd.log nsd.log.0"
      * Tell NSD to re-open the log file, like "rndc reload"
      * Compress the old log file, or delete it, or whatever

This is basic log file rotation.

We can do this by restarting NSD, but we would prefer not to stop
service, even for a brief period of time.

--
Shane

On Fri, 2008-11-07 at 11:08 +0100, Matthijs Mekking wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Shane,
> 
> I'm not sure if I understand what you mean by a rotated log file. Could
> you give me some more pointers of what you are trying to do?
> 
> Shane Kerr wrote:
> > Hello,
> > 
> > As far as I can tell, if you specify a log file for NSD it is never
> > rotated.
> > 





More information about the nsd-users mailing list