I am setting the mongo logger as below
<logger name="org.mongodb" level="debug"/>
When I run the query using java driver in Micronuat application
DEBUG org.mongodb.driver.protocol.command - Sending command '{"aggregate": "product.category", "pipeline": [{"$match": {"$and": [{"_id": {"$oid": "60c4aed3afb396342bf90802"}}, {"subCategory._id": {"$oid": "60cc5dd52b5cf415ded7de5d"}}]}}, {"$group": {"_id": 1, "n": {"$sum": 1}}}], "cursor": {}, "$db": "FeteBird-Product", "lsid": {"id": {"$binary": {"base64": "9UGXhsvnSZ+FXRCDwsiyWA==", "subType": "04"}}}}'
But if I copy this command and try to run in mongoshell it won't work, how can I show what exact query it is generating. So that I can run that query and see the output on console