Alexey Zakharov
Alexey Zakharov

Reputation: 25110

How can I trace mongoDB queries

I'm running mongodb server as a windows service. How can i connect to it via console to trace executed queries?

Best regards, Alexey Zakharov

Upvotes: 3

Views: 2414

Answers (1)

Kyle Banker
Kyle Banker

Reputation: 4359

Turn on profiling:

db.setProfilingLevel(2);

Then you can just query the system.profile collection to see the queries.

Upvotes: 7

Related Questions