C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::detail::log_level_map Class Reference

Maps log levels to their names. More...

#include <log_level_map.hpp>

Public Member Functions

 log_level_map (const log_level_map &)=default
 
 log_level_map (log_level_map &&) noexcept=default
 
log_level_mapoperator= (const log_level_map &)=default
 
log_level_mapoperator= (log_level_map &&) noexcept=default
 
std::string_view operator[] (unsigned level) const noexcept
 Returns the name of the log level at level.
 
unsigned by_name (std::string_view val) const noexcept
 Tries to find the key for val (case insensitive).
 
void set (std::string name, unsigned level)
 Inserts or overwrites a custom log level name.
 
template<class Map >
void set (const Map &input)
 Inserts or overwrites all custom log level names from input.
 

Detailed Description

Maps log levels to their names.

Member Function Documentation

◆ by_name()

unsigned caf::detail::log_level_map::by_name ( std::string_view val) const
nodiscardnoexcept

Tries to find the key for val (case insensitive).

Returns
the key associated to val or 0.

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