def loggers_to_close
      loggers_to_close = []
      all_loggers.each do |logger|
        # unfortunately Logger does not provide access to the logdev
        # via public API. In order to reduce amount of impact and
        # handle only File type log devices I had to use this method
        # to get access to it.
        next unless (logdev = logger.instance_variable_get(:"@logdev"))
        loggers_to_close << logger if logdev.filename
      end
      loggers_to_close
    end
def loggers_to_close
      loggers_to_close = []
      all_loggers.each do |logger|
        # unfortunately Logger does not provide access to the logdev
        # via public API. In order to reduce amount of impact and
        # handle only File type log devices I had to use this method
        # to get access to it.
        next unless (logdev = logger.instance_variable_get(:"@logdev"))
        loggers_to_close << logger if logdev.filename
      end
      loggers_to_close
    end
select all loggers with File log devices