Navigation Menu

Skip to content

Commit

Permalink
Set Time#iso8601 instead of Time object into record
Browse files Browse the repository at this point in the history
Time object should not be member of record. It causes "undefined
method `to_msgpack`" error because Time object is not defined in
msgpack format spec.
  • Loading branch information
kenhys committed Oct 26, 2017
1 parent 7405fe8 commit b1491f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fluent/plugin/parser_groonga_log.rb
Expand Up @@ -36,7 +36,11 @@ def parse(text)
event_time = Fluent::EventTime.from_time(statistic.timestamp)
record = {}
statistic.each_pair do |member, value|
record[member.to_s] = value
if value.kind_of?(Time)
record[member.to_s] = value.iso8601
else
record[member.to_s] = value
end
end
yield event_time, record
end
Expand Down

0 comments on commit b1491f7

Please sign in to comment.