Menu

#12 Need log files rotation

open
nobody
None
5
2005-07-21
2005-07-21
No

There is no log file rotation mechanizm. It may cause to
disk out of space problem after some time period.

I suggest to add 2 parameters to frox.conf:
1) LogFilesNumber - max rotated files to save
2) LogFileSize - log file size before rotation

When frox is starting or in some point of code when it
running, check the log file size. If filesize more than
LogFileSize, move current log file to *.x and create new
log file. When x is a running number in range of 1-
LogFilesNumber.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I made a simple modification that allows a '|' character in LogFiles parameter. When a '|' is found, a pipe is opened to an external command (whatever follows the '|'). I then used something like cronolog to manage the logfile rotation (a la apache). Deleting the logfiles is then just another system-provided functionality.
    Patches available upon request.

    Example config:
    LogFile | /usr/local/sbin/cronolog /var/log/frox/frox.%Y-%m-%d.log

    Grant

     
  • Nobody/Anonymous

    Logged In: NO

    oops. email grant.bristow@tanner.com is for the '|' command comment above.

    Grant

     

Log in to post a comment.

MongoDB Logo MongoDB