Rotate auto.log to auto_<timestamp>.log when it excedes settings logsize #16

Merged
af123 merged 1 commits from :Rotate_auto.log into master 2020-10-16 13:14:17 +00:00
Contributor

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.

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.
MymsMan started working 2020-07-26 18:51:23 +00:00
af123 approved these changes 2020-10-16 13:14:04 +00:00
af123 merged commit ac4b392db8 into master 2020-10-16 13:14:12 +00:00
MymsMan deleted branch Rotate_auto.log 2020-10-16 17:06:37 +00:00
MymsMan stopped working 2021-05-19 10:41:31 +00:00
7119h 50min 8s
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Total Time Spent: 9 months 3 weeks
MymsMan
9 months 3 weeks
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hummypkg/webif#16
No description provided.