LogIt++
Loading...
Searching...
No Matches
logit::ILogger Interface Referenceabstract

Interface for loggers that handle log message output. More...

#include <ILogger.hpp>

Inheritance diagram for logit::ILogger:
logit::ConsoleLogger logit::FileLogger logit::UniqueFileLogger

Public Member Functions

virtual ~ILogger ()=default
 
virtual void log (const LogRecord &, const std::string &)=0
 Logs a message.
 
virtual std::string get_string_param (const LoggerParam &param) const =0
 Retrieves a string parameter from the logger. Derived classes should implement this to return specific string-based parameters.
 
virtual int64_t get_int_param (const LoggerParam &param) const =0
 Retrieves an integer parameter from the logger. Derived classes should implement this to return specific integer-based parameters.
 
virtual double get_float_param (const LoggerParam &param) const =0
 Retrieves a floating-point parameter from the logger. Derived classes should implement this to return specific floating-point-based parameters.
 
virtual void wait ()=0
 Waits for all asynchronous logging operations to complete.
 

Detailed Description

Interface for loggers that handle log message output.

Definition at line 13 of file ILogger.hpp.

Constructor & Destructor Documentation

◆ ~ILogger()

virtual logit::ILogger::~ILogger ( )
virtualdefault

Member Function Documentation

◆ get_float_param()

virtual double logit::ILogger::get_float_param ( const LoggerParam & param) const
pure virtual

Retrieves a floating-point parameter from the logger. Derived classes should implement this to return specific floating-point-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
A double representing the requested parameter.

Implemented in logit::ConsoleLogger, logit::FileLogger, and logit::UniqueFileLogger.

◆ get_int_param()

virtual int64_t logit::ILogger::get_int_param ( const LoggerParam & param) const
pure virtual

Retrieves an integer parameter from the logger. Derived classes should implement this to return specific integer-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
An integer representing the requested parameter.

Implemented in logit::ConsoleLogger, logit::FileLogger, and logit::UniqueFileLogger.

◆ get_string_param()

virtual std::string logit::ILogger::get_string_param ( const LoggerParam & param) const
pure virtual

Retrieves a string parameter from the logger. Derived classes should implement this to return specific string-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
A string representing the requested parameter.

Implemented in logit::ConsoleLogger, logit::FileLogger, and logit::UniqueFileLogger.

◆ log()

virtual void logit::ILogger::log ( const LogRecord & ,
const std::string &  )
pure virtual

Logs a message.

This pure virtual function must be implemented by derived logger classes. It handles the logging of messages, which could be output to a console, file, or other destinations.

Parameters
recordThe log record containing details about the log event.
messageThe formatted log message.

Implemented in logit::ConsoleLogger, logit::FileLogger, and logit::UniqueFileLogger.

◆ wait()

virtual void logit::ILogger::wait ( )
pure virtual

Waits for all asynchronous logging operations to complete.

This pure virtual function must be implemented by derived logger classes. It ensures that any pending log messages are fully processed, especially when logging asynchronously.

Implemented in logit::ConsoleLogger, logit::FileLogger, and logit::UniqueFileLogger.


The documentation for this interface was generated from the following file: