Interface for loggers that handle log message output.
More...
#include <ILogger.hpp>
|
virtual | ~ILogger ()=default |
|
virtual void | log (const LogRecord &, const std::string &)=0 |
| Logs a message.
|
|
virtual std::string | get_string_param (const LoggerParam ¶m) 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 ¶m) 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 ¶m) 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.
|
|
Interface for loggers that handle log message output.
Definition at line 13 of file ILogger.hpp.
◆ ~ILogger()
virtual logit::ILogger::~ILogger |
( |
| ) |
|
|
virtualdefault |
◆ 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
-
param | The 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
-
param | The 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
-
param | The 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
-
record | The log record containing details about the log event. |
message | The 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: