Skip to content

Add handling of inode changes to reopen files in StreamHandler #1963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cesargb
Copy link

@cesargb cesargb commented Apr 12, 2025

In log rotation processes, I don't always have control to reopen files when they are renamed or deleted. Therefore, if I don't want to truncate the file, I need a mechanism for the process writing to the log to detect that the file has changed.

With this change, before performing a write operation, the process writing to the log checks if the file has changed. If so, it reopens the file and continues writing to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant