lib/semantic_logger/appenders.rb in semantic_logger-4.16.0 vs lib/semantic_logger/appenders.rb in semantic_logger-4.16.1

- old
+ new

@@ -47,12 +47,12 @@ def close closed_appenders = [] each do |appender| logger.trace "Closing appender: #{appender.name}" - appenders << appender appender.flush appender.close + closed_appenders << appender rescue Exception => e logger.error "Failed to close appender: #{appender.name}", e end # Delete appenders outside the #each above which prevents changes during iteration. closed_appenders.each { |appender| delete(appender) }