Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16755

Global severity seems to overwrite component severity in some cases

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc5
    • Affects Version/s: 2.8.0-rc4
    • Component/s: Logging
    • Labels:
      None
    • Fully Compatible
    • ALL

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: