Add log component to non-debug messages

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • 2.7.5
    • Affects Version/s: 2.7.4
    • Component/s: Logging
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently only debug log messages are written with the log component name. It would be useful to log the component name for severities other than DEBUG(N).

      These macros should use the log component declared at the top of the file using the macro:

      #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kMyComponent

      Example:

      2014-08-12T13:05:49.142-0400 D COMMANDS [conn4] run command admin.$cmd { _isSelf: 1 }
      2014-08-12T13:05:49.142-0400 I QUERY    [conn4] command admin.$cmd command: _isSelf { _isSelf: 1 } ntoreturn:1 keyUpdates:0 numYields:0  reslen:53 0ms
      2014-08-12T13:05:49.142-0400 I REPLSETS [rsStart] replSet load config ok from benetymbp.local:31100
      2014-08-12T13:05:49.142-0400 D NETWORK  [conn4] Socket recv() conn closed? 10.4.112.255:63280
      

      A secondary goal would be to disallow the use of mongo/util/log.h in headers.

              Assignee:
              Benety Goh
              Reporter:
              Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: