Skip to content

prevent active log from being overwritten when agent starts#11386

Merged
lgfa29 merged 4 commits intomainfrom
fix-append-to-active-log
Oct 27, 2021
Merged

prevent active log from being overwritten when agent starts#11386
lgfa29 merged 4 commits intomainfrom
fix-append-to-active-log

Conversation

@lgfa29
Copy link
Copy Markdown
Contributor

@lgfa29 lgfa29 commented Oct 26, 2021

Before #11070 the agent assumed that a new log file always started fresh, and so it truncated the file and assumed it was just created.

#11070 changed this behaviour to keep the active log file name stable, but didn't modify the full process. This caused the agent to overwrite log lines that were not rotated in a previous run.

This PR updates the logic so new log lines are appended to the active log file and that the internal state is also updated accordingly with the existing file information.

Closes #11379

@lgfa29 lgfa29 marked this pull request as draft October 26, 2021 00:21
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rotate active log file on agent restart

2 participants