MongoDB C++ Driver  legacy-1.1.2
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. 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...
 

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

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


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