Exception: LogStash::Filters::Grok::TimeoutException
- Inherits:
-
Exception
- Object
- Exception
- LogStash::Filters::Grok::TimeoutException
- Defined in:
- lib/logstash/filters/grok/timeout_exception.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#grok ⇒ Object
readonly
Returns the value of attribute grok.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(grok = nil, field = nil, value = nil) ⇒ TimeoutException
constructor
A new instance of TimeoutException.
- #message ⇒ Object
- #trunc_value ⇒ Object
Constructor Details
#initialize(grok = nil, field = nil, value = nil) ⇒ TimeoutException
Returns a new instance of TimeoutException.
4 5 6 7 8 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 4 def initialize(grok=nil, field=nil, value=nil) @field = field @value = value @grok = grok end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
2 3 4 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 2 def field @field end |
#grok ⇒ Object (readonly)
Returns the value of attribute grok.
2 3 4 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 2 def grok @grok end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
2 3 4 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 2 def value @value end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 10 def "Timeout executing grok '#{@grok.pattern}' against field '#{field}' with value '#{trunc_value}'!" end |
#trunc_value ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/logstash/filters/grok/timeout_exception.rb', line 14 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 |