Implement basic log rotation (closes #211) #344

Merged
gahag merged 2 commits from log-rotate into master 2019-10-29 21:21:05 +01:00
gahag commented 2019-10-22 21:42:01 +02:00 (Migrated from github.com)

As discussed in #211, this PR introduces the automatic moving of and existing log file to an .old file. This means logs are preserved for the last 2 executions, and also implies the -shrinkdebugfile is no longer useful, and thus removed.

Please tell me if there are any improvements to be made.

As discussed in #211, this PR introduces the automatic moving of and existing log file to an `.old` file. This means logs are preserved for the last 2 executions, and also implies the -shrinkdebugfile is no longer useful, and thus removed. Please tell me if there are any improvements to be made.
BrannonKing commented 2019-10-22 22:12:00 +02:00 (Migrated from github.com)

How does the rename handle conflicts should an existing "old" file already exist?

How does the rename handle conflicts should an existing "old" file already exist?
gahag commented 2019-10-22 23:17:07 +02:00 (Migrated from github.com)

The old file is always replaced if it exists. This is an important part for assuring you have the log from the last two executions, but no more.

The old file is always replaced if it exists. This is an important part for assuring you have the log from the last two executions, but no more.
gahag commented 2019-10-24 04:25:09 +02:00 (Migrated from github.com)

@BrannonKing please tell me if there's anything to be improved on this.

@BrannonKing please tell me if there's anything to be improved on this.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
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: LBRYCommunity/lbrycrd#344
No description provided.