The database profiler and the process log vary in verbosity and in some cases, content.
Here’s my understanding.
Process Log features:
- Logs are written to
--logpath or to the console
- Cannot directly query the log using
setLogLevel(1 to 5)
sampleRate still apply. Meaning it will log diagnostic logs based on these two settings.
- Note, slow queries still get logged but not at the level of granularity that the Database Profiler provides. These slow queries will come under the COMMAND status in the log file.
Database Profiler features:
- Logs are written to the
- Can query the log using
operationProfiling.mode("slowOp" | all) or
db.setProfilingLevel(1 | 2)
sampleRate apply. Meaning it will log database logs based on these two settings but with increased verbosity.
As you can see, even though the profiling level is off or 0, diagnostic logs are still written to the log file based on the
Therefore, this ticket is about logging any process that takes 50ms and re-routing these diagnostic logs to a log file. The word “query” confuses things!