How to log the queries executed by Spring Data MongoDB?
The easiest way is to set the log level to DEBUG
for org.springframework.data.mongodb
.
logging:
level:
org.springframework.data.mongodb.core.MongoTemplate: DEBUG
To clarify Oliver's answer add that to the application.yml file or properties file.