HiveMind
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Logger Class Reference

#include <Logger.h>

Inheritance diagram for Logger:
Inheritance graph
Collaboration diagram for Logger:
Collaboration graph

Public Member Functions

 Logger (LogLevel level, IUserInterface &ui)
 
 ~Logger () override=default
 
LogRet log (LogLevel level, const char *format,...) override
 Logs if the provided level is higher than the current log level (Thread-safe) More...
 
LogRet log (LogLevel level, const char *format, va_list args) override
 Logs if the provided level is higher than the current log level (Thread-safe) More...
 
- Public Member Functions inherited from ILogger
virtual ~ILogger ()=default
 

Static Private Member Functions

static char logLevelToString (LogLevel logLevel)
 

Private Attributes

IUserInterfacem_ui
 
LogLevel m_logLevel
 

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( LogLevel  level,
IUserInterface ui 
)

◆ ~Logger()

Logger::~Logger ( )
overridedefault

Member Function Documentation

◆ log() [1/2]

LogRet Logger::log ( LogLevel  level,
const char *  format,
va_list  args 
)
overridevirtual

Logs if the provided level is higher than the current log level (Thread-safe)

Parameters
[in]levelthe log level of the current call
[in]formatText to be written, can contain format specifiers that will be replaced by values specified in the additionnal arguments, matches the standard printf function
[in]argsAdditionnal arguments for the format parameter

Implements ILogger.

Here is the call graph for this function:

◆ log() [2/2]

LogRet Logger::log ( LogLevel  level,
const char *  format,
  ... 
)
overridevirtual

Logs if the provided level is higher than the current log level (Thread-safe)

Parameters
[in]levelthe log level of the current call
[in]formatText to be written, can contain format specifiers that will be replaced by values specified in the additionnal arguments, matches the standard printf function
[in]...Additionnal arguments for the format parameter

Implements ILogger.

Here is the caller graph for this function:

◆ logLevelToString()

char Logger::logLevelToString ( LogLevel  logLevel)
staticprivate
Here is the caller graph for this function:

Member Data Documentation

◆ m_logLevel

LogLevel Logger::m_logLevel
private

◆ m_ui

IUserInterface& Logger::m_ui
private

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