Daemon Log Rotation

The daemon.log, discussed in Master Database Files, is copied to daemon.log.old when it reaches a pre-defined limit, set by the REALMAXLOGSIZE environment variable, and a new daemon.log is started. The default limit is 1Mbyte.

Optionally, the daemon.log.old file can be copied to another file before the rotation of daemon.log to daemon.log.old. The old daemon.log.old file is renamed yymmddhhmm specifying the time when rotation occurred. If two rotations occur within a minute (which is improbable), a generation number is added to the old log file name.

This facility is disabled by default. To enable it, create the directory REALROOTClosed To use an environment variable: On UNIX, $variableName; On Windows, %variableName%/files/oldlogs which is used as the default directory for holding old logs. A different directory can be set by defining the environment variable REALOLDLOGDIR.

The maximum number of old log files that can be held in the old logs directory is specified by the REALOLDLOGMAX environment variable (default: 4). If you set REALOLDLOGMAX greater than zero and REALOLDLOGDIR is not set, REALROOTClosed To use an environment variable: On UNIX, $variableName; On Windows, %variableName%/files/oldlogs is created automatically.

To prevent the REALROOT file system from filling up, set REALOLDLOGDIR to point to a different file system.

Caution

If the limit on the size of the daemon.log is set too high, system performance will deteriorate when the daemon.log is copied to daemon.log.old.  It is therefore recommended that, if you wish to keep a large volume of log history, you make REALOLDLOGMAX larger and let REALMAXLOGSIZE take the default size of one Megabyte.