for example I have following query at express.js using mongoose to call mongo database.
myCollection.findOne({ }, function (err, result1) {
myCollection2.findOne({ }, function (err, result2) {
myCollection3.findOne({ }, function(err, result3){
}
when I look up the logfile, I can see following as there's myCollection3 query talk to mongo db. But there's no myCollection & myCollection2 at the file. Is this a default behavior of mongo logging?
myCollection3 query......
Profiling doesn't output to the logs. It outputs to the system.profile collection of the database. In db.setProfilingLevel(level, slowMS), slowMS is the number of milliseconds that a querys execution time must exceed before it is logged to the log. But 1 is the smallest meaningful value for slowMS. With the profiling level at 2, all queries will be in the system.profile collection, so look there instead.