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
21 lines
602 B
module SemanticLogger
|
|
class Appenders < Concurrent::Array
|
|
def close
|
|
closed_appenders = []
|
|
each do |appender|
|
|
logger.trace "Closing appender: #{appender.name}"
|
|
|
|
# PVINCENT's change
|
|
closed_appenders << appender # closed_ missing!!!!
|
|
# END OF change
|
|
|
|
appender.flush
|
|
appender.close
|
|
rescue Exception => e
|
|
logger.error "Failed to close appender: #{appender.name}", e
|
|
end
|
|
closed_appenders.each { |appender| delete(appender) }
|
|
logger.trace 'All appenders closed and removed from appender list'
|
|
end
|
|
end
|
|
end
|