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.
- is depended on by
-
SERVER-14965 assign accessControl log component to enterprise source files
- Closed
-
SERVER-15380 Finish assigning default log component to all implementation files
- Closed
- is related to
-
SERVER-5092 Better named logging with tracing
- Closed
-
SERVER-85138 guide for log messages and debug levels
- Closed
-
SERVER-4217 add log severity and component name to the log message
- Closed
- related to
-
SERVER-14894 modify S2 debug log message about intersecting edges to use GeoJSON format
- Closed