I'm using Spring Data's Querydsl integration to execute my queries using predicates.
findAll(predicate, pageable)
Is there a way to dump the actual raw queries/commands that get executed?
I have also looked at the answer to this question and it wasn't working for me.. Configure logging for the MongoDB Java driver
--Update-- I've managed to get the logging working by adding logging.level.org.mongodb.driver=DEBUG in application.properties (not log4j.properties)
But still, I can't see the raw query that's being performed:
2016-03-23 21:50:56 DEBUG query:56 - Query completed 2016-03-23 21:50:56 DEBUG query:56 - Sending query of namespace testdb.reservation on connection [connectionId{localValue:4, serverValue:42631}] to server ds046785.mongolab.com:39186
Enable the profiler by setting the profile value using the following command in the mongo shell:
db.setProfilingLevel(2)
output of the profiler can be viewed using this command:
db.system.profile.find( { millis : { $gt : 100 } } )
This command displays all operations longer than 100 milliseconds
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