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: Use correct varname for closed appenders #290

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

ixti
Copy link
Contributor

@ixti ixti commented Jul 17, 2024

Changelog

  • Fix regression in SemanticLogger::Appenders#close

Description of changes

Backported (from v5) changes to #close track list of closed appenders. Unfortunately, the variable name used for tracking is closed_appenders, while in the loop we're trying to add the closed appender into non-existing variable appenders.

This patch fixes the issue. Also, I moved closed_appenders << appender after the fact of closure, so that the returned list is correct in case of either flush or close failed.


Closes: #291


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ixti
Copy link
Contributor Author

ixti commented Jul 17, 2024

Also, I propose to change rescue Exception to rescue StandardError to avoid preventing process from dying in case of signals.

@ixti
Copy link
Contributor Author

ixti commented Aug 21, 2024

ping

@firstsano
Copy link

ping +1

@ixti ixti force-pushed the fix-appenders-close branch from 093c025 to ce574f8 Compare September 2, 2024 15:18
@ixti
Copy link
Contributor Author

ixti commented Sep 2, 2024

@reidmorrison is there any chance this small fix will be merged & released any time soon?

@reidmorrison reidmorrison merged commit f2558aa into reidmorrison:master Sep 3, 2024
5 checks passed
@ixti ixti deleted the fix-appenders-close branch September 5, 2024 14:56
@ixti
Copy link
Contributor Author

ixti commented Sep 5, 2024

Thank you!

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.

Semantic Logger 4.16.0 introduces a bug breaking SemanticLogger::Appenders#close
3 participants