This is how the Mongoid log the operations:
D, [2016-01-12T18:42:19.790639 #7906] DEBUG -- : MONGODB | localhost:27017 | app_test.update | STARTED | {"update"=>"users", "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('5695652bc54d2d1ee200001e')}, "u"=>{"$addToSet"=>{"favorite_ids"=>{"$each"=>[BSON::ObjectId('5695652bc54d2d1ee200001f')]}}}, "multi"=>false, "upsert"=>false}], "writeConcern"=>{:w=>1}, "orde...
I want to be able to see the full log message. Is that possible?
Obs: I'm using Mongoid 5.
After digging into Mongo Ruby Driver (which is used by Mongoid >= 5), I've found a solution:
Mongo::Monitoring::CommandLogSubscriber::LOG_STRING_LIMIT = 1_000
Edit
The proper way to do this is add truncate_logs
option to mongoid.yml file:
config/mongoid.yml:
development:
clients:
default:
database: database_name_development
hosts:
- localhost:27017
options:
truncate_logs: false
--
Mongoid has a poor documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With