The LogType class is used to define different types of logs using bit flags. Each log type is represented by a different bit in a std::uint8_t value. This allows multiple log types to be combined using bitwise operations.
More...
#include <herrlog.hh>
|
| enum | : std::uint8_t {
Trace = 0b000001
, Debug = 0b000010
, Info = 0b000100
, Error = 0b001000
,
Warn = 0b010000
, Fatal = 0b100000
, All = 0b111111
, None = 0b000000
} |
| | Enum defining different log types as bit flags.
|
| |
|
| | LogType (std::uint8_t initial_flag) |
| | Construct a new Log Type object. Allows implicit conversion from uint8_t. Thus allows assignments like LogType Logger::log_type = LogType::All;. More...
|
| |
| LogType | operator| (const LogType other) const |
| | Overloading the | operator for combining log types. More...
|
| |
| bool | operator& (const LogType other) const |
| | Overloading the & operator for checking if a log type is set. More...
|
| |
The LogType class is used to define different types of logs using bit flags. Each log type is represented by a different bit in a std::uint8_t value. This allows multiple log types to be combined using bitwise operations.
◆ LogType()
| LogType::LogType |
( |
std::uint8_t |
initial_flag | ) |
|
|
inline |
Construct a new Log Type object. Allows implicit conversion from uint8_t. Thus allows assignments like LogType Logger::log_type = LogType::All;.
- Parameters
-
◆ operator&()
| bool LogType::operator& |
( |
const LogType |
other | ) |
const |
|
inline |
Overloading the & operator for checking if a log type is set.
- Parameters
-
- Returns
- true if the bit is set in both operands
-
false otherwise
◆ operator|()
Overloading the | operator for combining log types.
- Parameters
-
- Returns
- LogType
The documentation for this class was generated from the following file: