Skip to content
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

Fix FileDescriptors release on file rotate [#2100] #2115

Conversation

fsievers
Copy link

As reported by @kpalumbokitu in #2100 the file descriptors for rotated logs were not released after rotation. This change is an copy of the code provided by @kpalumbokitu in #2100.

This code works for me and also solves the problem of winston writing to multiple logfiles at the same time as reported in #1972 and #1905.

@wbt
Copy link
Contributor

wbt commented Apr 28, 2022

It looks like a test is failing, expecting a file to exist which does not. Can someone volunteer to look into why that's happening?

Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing if my approving will retrigger CI...

@DABH DABH self-requested a review January 8, 2024 01:45
@DABH
Copy link
Contributor

DABH commented Jan 8, 2024

I tend to agree with the comment in #2301 (comment) -- I think this PR is a bit too aggressive and will break log rotation in other ways. #2301 appears to have fixed the issue reported in #2100, at least for me, so I'm going to go ahead and close this PR for now. But if you think that something like this is still needed, feel free to let me know / open a new issue. Thank you for your contributions to winston!

@DABH DABH closed this Jan 8, 2024
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.

3 participants