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:

  • (LogStash::Error)


95
96
97
98
99
# File 'lib/logstash/string_interpolation.rb', line 95

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