semantic_logger icon indicating copy to clipboard operation
semantic_logger copied to clipboard

fix: Use correct varname for closed appenders

Open ixti opened this issue 1 year ago • 3 comments

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.

ixti avatar Jul 17 '24 01:07 ixti

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

ixti avatar Jul 17 '24 01:07 ixti

ping

ixti avatar Aug 21 '24 21:08 ixti

ping +1

firstsano avatar Aug 26 '24 10:08 firstsano

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

ixti avatar Sep 02 '24 15:09 ixti

Thank you!

ixti avatar Sep 05 '24 15:09 ixti