semantic_logger
semantic_logger copied to clipboard
fix: Use correct varname for closed appenders
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: https://github.com/reidmorrison/semantic_logger/issues/291
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Also, I propose to change rescue Exception to rescue StandardError to avoid preventing process from dying in case of signals.
ping
ping +1
@reidmorrison is there any chance this small fix will be merged & released any time soon?
Thank you!