You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you pass Ruby's date related objects (such as Date, Time, DateTime) to Fluent::Logger#post, out_mongo stores it as a plain string in mongodb.
I think it must be stored as an ISODate("...") format, like the way usual timestamps are stored.
My code: Fluent::Logger.post('mytag', {text: 'foo', created_at: DateTime.now})
This is not fluent-plugin-mongo and to_msgpack problem.
Ruby's Yajl and JSON convert Time related object into String object.
The cause is this conversion rule in fluent-logger-ruby.
When you pass Ruby's date related objects (such as
Date
,Time
,DateTime
) toFluent::Logger#post
, out_mongo stores it as a plain string in mongodb.I think it must be stored as an
ISODate("...")
format, like the way usual timestamps are stored.My code:
Fluent::Logger.post('mytag', {text: 'foo', created_at: DateTime.now})
Results in:
Is this fluent-plugin-mongo's problem? Or is it
to_msgpack
related problem? I'm quite not sure, but it must be related with the serialization process.The text was updated successfully, but these errors were encountered: