Class: LogStash::EpocNode

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/string_interpolation.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(event) ⇒ Object

Raises:



85
86
87
88
89
# File 'lib/logstash/string_interpolation.rb', line 85

def evaluate(event)
  t = event.timestamp
  raise LogStash::Error, "Unable to format in string \"#{@format}\", #{LogStash::Event::TIMESTAMP} field not found" unless t
  t.to_i.to_s
end