MongoDB C++ Driver
legacy-1.1.2
|
Log components. More...
#include <log_component.h>
Public Member Functions | |
LogComponent | parent () const |
Returns parent component. More... | |
StringData | toStringData () const |
Returns short name as a StringData. | |
std::string | getShortName () const |
Returns short name of log component. More... | |
std::string | getDottedName () const |
Returns dotted name of log component - short name prefixed by dot-separated names of ancestors. More... | |
StringData | getNameForLog () const |
Returns name suitable for inclusion in formatted log message. More... | |
Log components.
Debug messages logged using the LOG() or MONGO_LOG_COMPONENT(). Macros may be associated with one or more log components.
std::string mongo::logger::LogComponent::getDottedName | ( | ) | const |
Returns dotted name of log component - short name prefixed by dot-separated names of ancestors.
Used to generate command line and config file option names.
StringData mongo::logger::LogComponent::getNameForLog | ( | ) | const |
Returns name suitable for inclusion in formatted log message.
This is derived from upper-casing the short name with some padding to fit into a fixed length field.
std::string mongo::logger::LogComponent::getShortName | ( | ) | const |
Returns short name of log component.
Used to generate server parameter names in the format "logLevel_<component short name>".
LogComponent mongo::logger::LogComponent::parent | ( | ) | const |
Returns parent component.
Returns kNumComponents if parent component is not defined (for kDefault or kNumLogComponents).