Spring Data Mongodb: How to Dump Raw Query/Commands generated through QueryDsl?

Viewed 2633

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

1 Answers
Related