Parfis  v0.0.7
Classes | Macros | Enumerations
Logging

Classes and functions used for logging. More...

Classes

struct  parfis::Logger
 Logger class. More...
 

Macros

#define LOG(logger, level, msg)   {}
 Logging macro function that yields calls to Logger::log only when LOG_LEVEL is not zero.
 

Enumerations

enum  parfis::LogMask : uint32_t {
  parfis::LogMask::None = 0b0, parfis::LogMask::Error = 0b1, parfis::LogMask::Warning = 0b10, parfis::LogMask::Memory = 0b100,
  parfis::LogMask::Info = 0b1000
}
 Log bitmask that corresponds to log level. More...
 

Detailed Description

Classes and functions used for logging.

Enumeration Type Documentation

◆ LogMask

enum parfis::LogMask : uint32_t
strong

Log bitmask that corresponds to log level.

Loging is performed by calling the macro with the desired log message type. The macro calls a function from the parfis::Logger::log and based on the LOG_LEVEL saves the message. For example the comand LOG(m_logger, LogMask::Info, "Test message"); will log if the LOG_LEVEL has set bit on position four.

Enumerator
None 

No logging (mask: 0000)

Error 

Log error messages (mask: 0001)

Warning 

Log warning messages (mask: 0010)

Memory 

Log messages concerned with memory allocation/deallocation (mask: 0100)

Info 

Log info messages (mask: 1000)