Search code examples
mongodbprofilingmongodb-.net-driver

Profiling MongoDB queries when using C# driver


Is there a way to log the actual queries that are produced by the MongoDB C# driver and sent to the mongodb? Like in SQL Server, you have SQL Profiler that shows you all the incoming queries.


Solution

  • db.setProfilingLevel(2);
    

    http://www.mongodb.org/display/DOCS/Database+Profiler