Closed vasi-grigo closed 9 years ago
$a = new \MongoDate(); var_dump($a);
object(MongoDate)[5] public 'sec' => int 1418904741 public 'usec' => int 929000
Fluent don't know about MongoDate and other SomeDateClass and it's correct
the yield part is from MongoDB via console naturally, if var_dump is done in php right after instantiation - it will show MongoDate in PHP but you would want it transferred into mongo preserved as ISODate because the latter offers a lot of nice features
I think it's a problem of MongoData. For exemple: Today i send data throw fluent to mongo. Tomorrow i can change matching to Mysql. Fluent work with abstract platform.
Please. Look at https://github.com/fluent/fluent-logger-php/blob/master/src/Fluent/Logger/JsonPacker.php
all data is packed to json
for exemple run: $d = new MongoDate(); var_dump(json_encode($d)); exit();
json doesn't content any information about MongoDate(), Date(), PsqlDate() etc. try to send timestamp
yes, probably this is more of an improvement for the mongo fluentd plugin; not fluentd or fluent-logger-php thanks for the help
hello using fluent-logger-php and encountering the following issue when using it with mongodb:
php:
yields:
Object type is lost. Should it not be something like
{"a" : ISODate("2014-12-18T10:23:03Z")}
?thank you for the work you've done, cheers