20 #include "mongo/logger/log_severity.h"
31 LabeledLevel(
const char* label,
int level) : _label(label), _level(level) {}
32 LabeledLevel(
const std::string& label,
int level) : _label(label), _level(level) {}
42 const std::string& getLabel()
const {
45 int getLevel()
const {
58 inline bool operator<(
const LabeledLevel& ll,
const int i) {
59 return ll.getLevel() < i;
61 inline bool operator<(
const int i,
const LabeledLevel& ll) {
62 return i < ll.getLevel();
64 inline bool operator>(
const LabeledLevel& ll,
const int i) {
65 return ll.getLevel() > i;
67 inline bool operator>(
const int i,
const LabeledLevel& ll) {
68 return i > ll.getLevel();
70 inline bool operator<=(
const LabeledLevel& ll,
const int i) {
71 return ll.getLevel() <= i;
73 inline bool operator<=(
const int i,
const LabeledLevel& ll) {
74 return i <= ll.getLevel();
76 inline bool operator>=(
const LabeledLevel& ll,
const int i) {
77 return ll.getLevel() >= i;
79 inline bool operator>=(
const int i,
const LabeledLevel& ll) {
80 return i >= ll.getLevel();
82 inline bool operator==(
const LabeledLevel& ll,
const int i) {
83 return ll.getLevel() == i;
85 inline bool operator==(
const int i,
const LabeledLevel& ll) {
86 return i == ll.getLevel();
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
static LogSeverity cast(int)
Casts an integer to a severity.
Definition: log_severity-inl.h:40
Representation of the severity / priority of a log message.
Definition: log_severity.h:33
Deprecated utility for associating a string and log level together.
Definition: labeled_level.h:28