Embedded Artistry Framework
Embedded Systems C++ Framework
Enumerations | Functions | Variables
embvm::logger Namespace Reference

Log definitions. More...

Enumerations

enum  level {
  off = LOG_LEVEL_OFF, critical = LOG_LEVEL_CRITICAL, error = LOG_LEVEL_ERROR, warn = LOG_LEVEL_WARN,
  info = LOG_LEVEL_INFO, debug = LOG_LEVEL_DEBUG, verbose = LOG_LEVEL_VERBOSE
}
 C++ log level definitions. More...
 

Functions

constexpr std::string_view to_str (level l) noexcept
 Get the name of a log level. More...
 
constexpr const char * to_c_str (level l) noexcept
 Get the name of a log level as a C-string. More...
 
constexpr const char * to_short_c_str (level l) noexcept
 Get the short name of a log level as a C-string. More...
 

Variables

constexpr logger::level LOG_LEVEL_LIMIT = static_cast<logger::level>(LOG_LEVEL)
 Global log level limit. More...
 
constexpr std::string_view level_string_names [] LOG_LEVEL_NAMES
 Declare a global array of log level names. More...
 
constexpr const char *level_short_names [] LOG_LEVEL_SHORT_NAMES
 

Detailed Description

Log definitions.

Enumeration Type Documentation

◆ level

C++ log level definitions.

Enumerator
off 
critical 
error 
warn 
info 
debug 
verbose 

Function Documentation

◆ to_c_str()

constexpr const char* embvm::logger::to_c_str ( level  l)
inlinenoexcept

Get the name of a log level as a C-string.

Parameters
lThe level to get the name for.
Returns
the full name of the log level as a C-string.

◆ to_short_c_str()

constexpr const char* embvm::logger::to_short_c_str ( level  l)
inlinenoexcept

Get the short name of a log level as a C-string.

Parameters
lThe level to get the short name for.
Returns
the short name of the log level as a C-string.

Referenced by embvm::LoggerBase< TLock >::log().

◆ to_str()

constexpr std::string_view embvm::logger::to_str ( level  l)
inlinenoexcept

Get the name of a log level.

Parameters
lThe level to get the name for.
Returns
the full name of the log level as a std::string_view.

Variable Documentation

◆ LOG_LEVEL_LIMIT

constexpr logger::level embvm::logger::LOG_LEVEL_LIMIT = static_cast<logger::level>(LOG_LEVEL)
inline

Global log level limit.

Referenced by embvm::LoggerBase< TLock >::level().

◆ LOG_LEVEL_NAMES

constexpr std::string_view level_string_names [] embvm::logger::LOG_LEVEL_NAMES
inline

Declare a global array of log level names.

◆ LOG_LEVEL_SHORT_NAMES

constexpr const char* level_short_names [] embvm::logger::LOG_LEVEL_SHORT_NAMES
inline