mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
timestamp.to_iso8601 works for all platforms and faster than time format parsing
Fixes #2179
This commit is contained in:
parent
3c7fb7b9bc
commit
cce702e4d3
1 changed files with 4 additions and 11 deletions
|
@ -96,17 +96,10 @@ class LogStash::Event
|
||||||
return self.class.new(copy)
|
return self.class.new(copy)
|
||||||
end # def clone
|
end # def clone
|
||||||
|
|
||||||
if RUBY_ENGINE == "jruby"
|
public
|
||||||
public
|
def to_s
|
||||||
def to_s
|
self.sprintf("#{timestamp.to_iso8601} %{host} %{message}")
|
||||||
return self.sprintf("%{+yyyy-MM-dd'T'HH:mm:ss.SSSZ} %{host} %{message}")
|
end # def to_s
|
||||||
end # def to_s
|
|
||||||
else
|
|
||||||
public
|
|
||||||
def to_s
|
|
||||||
return self.sprintf("#{timestamp.to_iso8601} %{host} %{message}")
|
|
||||||
end # def to_s
|
|
||||||
end
|
|
||||||
|
|
||||||
public
|
public
|
||||||
def timestamp; return @data[TIMESTAMP]; end # def timestamp
|
def timestamp; return @data[TIMESTAMP]; end # def timestamp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue