Exception: LogStash::Filters::Grok::GrokTimeoutException

Inherits:
Exception
  • Object
show all
Defined in:
lib/logstash/filters/grok.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grok, field, value) ⇒ GrokTimeoutException

Returns a new instance of GrokTimeoutException.



487
488
489
490
491
# File 'lib/logstash/filters/grok.rb', line 487

def initialize(grok, field, value)
  @grok = grok
  @field = field
  @value = value
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



485
486
487
# File 'lib/logstash/filters/grok.rb', line 485

def field
  @field
end

#grokObject (readonly)

Returns the value of attribute grok.



485
486
487
# File 'lib/logstash/filters/grok.rb', line 485

def grok
  @grok
end

#valueObject (readonly)

Returns the value of attribute value.



485
486
487
# File 'lib/logstash/filters/grok.rb', line 485

def value
  @value
end

Instance Method Details

#messageObject



493
494
495
# File 'lib/logstash/filters/grok.rb', line 493

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

#trunc_valueObject



497
498
499
500
501
502
503
# File 'lib/logstash/filters/grok.rb', line 497

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