Currently the logs on 4.0 with mongoid are as follows:
MONGODB | localhost:27101 | mongoid.insert | STARTED | {"insert"=>"users", "ordered"=>true, "$clusterTime"=>{"clusterTime"=>#<BSON::Timestamp:0x000055a2e8bbbe40 @seconds=1542390914, @increment=1>, "signature"=>{"hash"=><BSON::Binary:0x47079088839660 type=generic data=0x0000000000000000...>, "keyId"=>0}}, ... MONGODB | localhost:27101 | mongoid.update | STARTED | {"update"=>"users", "ordered"=>true, "$clusterTime"=>{"clusterTime"=>#<BSON::Timestamp:0x000055a2e8990a08 @seconds=1542390915, @increment=4>, "signature"=>{"hash"=><BSON::Binary:0x47079087703160 type=generic data=0x0000000000000000...>, "keyId"=>0}}, ...
I take it the actual data being inserted is later in the bson document, and gets truncated. The first third of the log entry is thus useful in that it says an insert is happening, but the last two things are not too useful and the actual insert data is nowhere to be seen.
This can be worked around by installing a custom logger which does not truncate the output, but the driver can put together the fields in a different order to provide much more useful log output out of the box.
- related to
-
RUBY-1554 Mention to_json in logging examples in tutorial
- Closed
- links to