Class Logger
Defined in File logger.hpp
Class Documentation
-
class Logger
- Todo:
for asynchronous logging, make the logger an active object according to Herb Sutter https://herbsutter.com/2010/07/12/effective-concurrency-prefer-using-active-objects-instead-of-naked-threads/
Public Functions
-
LogLevel GetLogLevel() const noexcept
Getter method for the current LogLevel.
- Returns:
the current LogLevel
-
void SetLogLevel(const LogLevel logLevel) noexcept
Sets the LogLevel for the Logger.
- Parameters:
logLevel – [in] to be set
-
cxx::GenericRAII SetLogLevelForScope(const LogLevel logLevel) noexcept
Sets the LogLevel to the given level for the lifetime of the GenericRAII object and then sets it back to the previous one.
- Parameters:
logLevel – [in] to be set temporarily
- Returns:
a scope guard which resets the LogLevel to the value at the time when this method was called