Sha256: 6dc64299625155c13076a539c3882e1e93f3bedb9ed914acb727a05cf4955697

Contents?: true

Size: 359 Bytes

Versions: 8

Compression:

Stored size: 359 Bytes

Contents

require 'stud/try'

module LogStash module Helpers
  class LoggableTry < Stud::Try
    def initialize(logger, name)
      @logger = logger
      @name = name
    end

    def log_failure(exception, fail_count, message)
      @logger.warn("Attempt to #{@name} but failed. #{message}", fail_count: fail_count, exception: exception.message)
    end
  end
end end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
logstash-input-elasticsearch-4.21.1 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.21.0 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-5.0.0 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.20.5 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.20.4 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.20.3 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.20.2 lib/logstash/helpers/loggable_try.rb
logstash-input-elasticsearch-4.20.1 lib/logstash/helpers/loggable_try.rb