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

Representation of the severity / priority of a log message. More...

#include <log_severity.h>

Public Member Functions

LogSeverity moreSevere () const
 Returns a LogSeverity object that is one unit "more severe" than this one.
 
LogSeverity lessSevere () const
 Returns a LogSeverity object that is one unit "less severe" than this one.
 
std::string toString () const
 Returns a string naming this severity level. More...
 
StringData toStringData () const
 Returns a StringData naming this security level. More...
 
char toChar () const
 Returns a single capital letter naming this severity level. More...
 
bool operator== (const LogSeverity other) const
 Returns true if this is exactly as severe as other.
 
bool operator!= (const LogSeverity other) const
 Returns true if this is not exactly as severe as other.
 
bool operator< (const LogSeverity other) const
 Returns true if this is less severe than other.
 
bool operator<= (const LogSeverity other) const
 Returns true if this is no more severe than other.
 
bool operator> (const LogSeverity other) const
 Returns true if this is more severe than other.
 
bool operator>= (const LogSeverity other) const
 Returns true if this is no less severe than other.
 

Static Public Member Functions

static LogSeverity cast (int)
 Casts an integer to a severity. More...
 

Detailed Description

Representation of the severity / priority of a log message.

Severities are totally ordered, from most severe to least severe as follows: Severe, Error, Warning, Info, Log, Debug(1), Debug(2), ...

Member Function Documentation

LogSeverity mongo::logger::LogSeverity::cast ( int  ll)
inlinestatic

Casts an integer to a severity.

Do not use this. It exists to enable a handful of leftover uses of LOG(0) and the deprecated LabeledLevel.

char mongo::logger::LogSeverity::toChar ( ) const

Returns a single capital letter naming this severity level.

Equivalent to upper-case of first letter of toStringData() result.

Not all levels are uniquely named.

std::string mongo::logger::LogSeverity::toString ( ) const
inline

Returns a string naming this severity level.

See toStringData(), below.

StringData mongo::logger::LogSeverity::toStringData ( ) const

Returns a StringData naming this security level.

Not all levels are uniquely named. Debug(N) is named "debug", regardless of "N", e.g.


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