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

Interface for formatting log records. More...

#include <ILogFormatter.hpp>

Inheritance diagram for logit::ILogFormatter:
logit::SimpleLogFormatter

Public Member Functions

virtual ~ILogFormatter ()=default
 
virtual std::string format (const LogRecord &record) const =0
 Formats a log record into a string.
 

Detailed Description

Interface for formatting log records.

The ILogFormatter class defines an interface that any log formatter must implement. It provides a pure virtual function for formatting a log record into a string.

Definition at line 16 of file ILogFormatter.hpp.

Constructor & Destructor Documentation

◆ ~ILogFormatter()

virtual logit::ILogFormatter::~ILogFormatter ( )
virtualdefault

Member Function Documentation

◆ format()

virtual std::string logit::ILogFormatter::format ( const LogRecord & record) const
pure virtual

Formats a log record into a string.

This pure virtual function must be implemented by any class deriving from ILogFormatter. The implementation should format the log record into a human-readable or machine-readable string.

Parameters
recordThe log record to be formatted.
Returns
A string representing the formatted log message.

Implemented in logit::SimpleLogFormatter.


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