You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
602 B

  1. module SemanticLogger
  2. class Appenders < Concurrent::Array
  3. def close
  4. closed_appenders = []
  5. each do |appender|
  6. logger.trace "Closing appender: #{appender.name}"
  7. # PVINCENT's change
  8. closed_appenders << appender # closed_ missing!!!!
  9. # END OF change
  10. appender.flush
  11. appender.close
  12. rescue Exception => e
  13. logger.error "Failed to close appender: #{appender.name}", e
  14. end
  15. closed_appenders.each { |appender| delete(appender) }
  16. logger.trace 'All appenders closed and removed from appender list'
  17. end
  18. end
  19. end