When setting the QUERY component log level to 1, I would expect to see all QUERY messages that I would normally see at global log level 1. This doesn't seem to be the case.
1. run mongod 2.8.0-rc4
2. insert doc in collection: db.foo.insert({a: 1})
3. set QUERY component log level to 1: db.setLogLevel(1, "query")
4. make a query: db.foo.find({a: 1})
The query does not show up in the log.
Is my expectation wrong? I would expect this line to be logged:
2015-01-07T22:37:20.706+1100 I QUERY [conn3] query test.foo query: { a: 1.0 } planSummary: COLLSCAN ntoreturn:0 ntoskip:0 nscanned:0 nscannedObjects:1 keyUpdates:0 numYields:0 nreturned:1 reslen:53 0ms
But I only see this line when I increase the global log level to 1, with
db.setLogLevel(1)
or any of the other means, e.g. "mongod -v" or the setParameter command.
- related to
-
SERVER-16753 Wrong component for commands
- Closed