Rotate auto.log to auto_<timestamp>.log when it excedes settings logsize #16
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch ":Rotate_auto.log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The ::auto::loginit:: function currently copies the auto.log to auto_old.log when it reaches a size of 2Mb
With loglevel 2 set this can happen several times a day losing older log data since the manage-logs function only runs at startup.
With this change the auto.log is renamed with the current timestamp appended when the size excedes the logsize settings option.
Note: it doesn't attempt to maintain the number of archive logs, it doesn't really matter if the number of archive logs temporarily exceed the number specified in settings - they will be removed the next time manage-logs runs.