Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rotate record file before writing new log. (sonic-net#3158)
What I did Rotate file before writing the log for record files. Why I did it If we configure logrotate to compress, the old file stream will write to void after the old file is rotated and compressed. This PR changes the order of write and rotate. It will always rotate first and then write. There might still be log lost if logrotate sends HUP signal too late.
- Loading branch information