MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongo::logger::LogComponent Class Reference

Log components. More...

#include <log_component.h>

Public Member Functions

LogComponent parent () const
 Returns parent component.
 
StringData toStringData () const
 Returns short name as a StringData.
 
std::string getShortName () const
 Returns short name of log component.
 
std::string getDottedName () const
 Returns dotted name of log component - short name prefixed by dot-separated names of ancestors.
 
StringData getNameForLog () const
 Returns name suitable for inclusion in formatted log message.
 

Detailed Description

Log components.

Debug messages logged using the LOG() or MONGO_LOG_COMPONENT(). Macros may be associated with one or more log components.

Member Function Documentation

◆ getDottedName()

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.

◆ getNameForLog()

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.

◆ getShortName()

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>".

◆ parent()

LogComponent mongo::logger::LogComponent::parent ( ) const

Returns parent component.

Returns kNumComponents if parent component is not defined (for kDefault or kNumLogComponents).


The documentation for this class was generated from the following file: