MongoDB C++ Driver  legacy-1.1.2
Public Member Functions | List of all members
mongo::logger::LogComponentSettings Class Reference

Contains log severities for a list of log components. More...

#include <log_component_settings.h>

Public Member Functions

bool hasMinimumLogSeverity (LogComponent component) const
 Returns true if a minimum log severity has been set for this component. More...
 
LogSeverity getMinimumLogSeverity (LogComponent component) const
 Gets the minimum log severity for component. More...
 
void setMinimumLoggedSeverity (LogComponent component, LogSeverity severity)
 Sets the minimum log severity for component.
 
void clearMinimumLoggedSeverity (LogComponent component)
 Clears the minimum log severity for component. More...
 
bool shouldLog (LogComponent component, LogSeverity severity) const
 Predicate that answers the question, "Should I, the caller, append to you, the log domain, componented messages of the given severity?" True means yes. More...
 

Detailed Description

Contains log severities for a list of log components.

kDefault always has a log severity defined but it is not necessary to provide log severities for the other components (up to but not including kNumLogComponents).

Member Function Documentation

void mongo::logger::LogComponentSettings::clearMinimumLoggedSeverity ( LogComponent  component)

Clears the minimum log severity for component.

For kDefault, severity level is initialized to default value.

LogSeverity mongo::logger::LogComponentSettings::getMinimumLogSeverity ( LogComponent  component) const

Gets the minimum log severity for component.

Result is defined only if hasMinimumLogSeverity() returns true for component.

bool mongo::logger::LogComponentSettings::hasMinimumLogSeverity ( LogComponent  component) const

Returns true if a minimum log severity has been set for this component.

Used by log level commands to query component severity configuration.

bool mongo::logger::LogComponentSettings::shouldLog ( LogComponent  component,
LogSeverity  severity 
) const

Predicate that answers the question, "Should I, the caller, append to you, the log domain, componented messages of the given severity?" True means yes.

If minimum severity levels are not configured, compare 'severity' against the configured level for kDefault.


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