There is any way to log all mongodb query into file in nodejs? There is any way to log all MongoDB query into a file
Enable the profiler in MongoDB Database.

https://docs.mongodb.com/manual/reference/method/db.setProfilingLevel/