userver: userver/logging/level.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
level.hpp File Reference

Log levels. More...

#include <optional>
#include <string>
+ Include dependency graph for level.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  logging
 Logging macro and utilities.
 

Enumerations

enum class  logging::Level {
  kTrace = 0 ,
  kDebug = 1 ,
  kInfo = 2 ,
  kWarning = 3 ,
  kError = 4 ,
  kCritical = 5 ,
  kNone = 6
}
 Log levels. More...
 

Functions

Level logging::LevelFromString (std::string_view)
 Converts lowercase level name to a corresponding Level, throws std::runtime_error if no matching log level found.
 
std::string_view logging::ToString (Level level)
 Returns a string representation of logging level, e.g. "info".
 
std::string_view logging::ToUpperCaseString (Level level) noexcept
 Returns a string representation of logging level, e.g. "INFO".
 
std::optional< Levellogging::OptionalLevelFromString (const std::optional< std::string > &level_name)
 Returns std::nullopt if level_name is std::nullopt, otherwise behaves exactly like logging::LevelFromString.
 

Variables

constexpr auto logging::kLevelMax = static_cast<int>(Level::kNone)
 

Detailed Description

Log levels.

Definition in file level.hpp.