Sha256: 9065c1e119c08f3460fbc7cca0646c7b2dce4af2d5fc849f34f1c2b81029aa26

Contents?: true

Size: 542 Bytes

Versions: 14

Compression:

Stored size: 542 Bytes

Contents

class LogStash::Filters::Grok::TimeoutException < Exception
  attr_reader :grok, :field, :value
  
  def initialize(grok=nil, field=nil, value=nil)
    @field = field
    @value = value
    @grok = grok
  end

  def message
    "Timeout executing grok '#{@grok.pattern}' against field '#{field}' with value '#{trunc_value}'!"
  end

  def trunc_value
    if value.size <= 255 # If no more than 255 chars
      value
    else
      "Value too large to output (#{value.bytesize} bytes)! First 255 chars are: #{value[0..255]}"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
logstash-filter-grok-4.0.4 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-4.0.3 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-4.0.2 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-4.0.1 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-4.0.0 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.4.4 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.4.3 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.4.2 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.4.1 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.4.0 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.3.1 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.3.0 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.2.4 lib/logstash/filters/grok/timeout_exception.rb
logstash-filter-grok-3.2.3 lib/logstash/filters/grok/timeout_exception.rb