reidmorrison / semantic_logger

Semantic Logger is a feature rich logging framework, and replacement for existing Ruby & Rails loggers.
https://logger.rocketjob.io/
Apache License 2.0
873 stars 124 forks source link

fix: Use correct varname for closed appenders #290

Closed ixti closed 3 months ago

ixti commented 4 months ago

Changelog

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 commented 4 months ago

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

ixti commented 3 months ago

ping

firstsano commented 3 months ago

ping +1

ixti commented 3 months ago

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

ixti commented 2 months ago

Thank you!