kanzi::detail::ChainedLogger Class Reference

Provides interface to write log messages to multiple loggers. More...

#include <kanzi/core/log/chained_logger.hpp>

Inheritance diagram for kanzi::detail::ChainedLogger:
kanzi::AbstractLogger

Public Types

typedef unique_ptr< AbstractLoggerAbstractLoggerUniquePtr
 Typedef of the kanzi::AbstractLogger unique pointer. More...
 
typedef vector< AbstractLoggerUniquePtrAbstractLoggerVector
 Typedef of vector holding kanzi::AbstractLogger unique pointers. More...
 

Public Member Functions

void push (AbstractLogger *logger)
 Registers new logger. More...
 
void pop ()
 Removes last registered logger. More...
 
void popAll ()
 Removes all registered loggers. More...
 
- Public Member Functions inherited from kanzi::AbstractLogger
void write (LogLevel level, string_view levelName, string_view categoryName, string_view fileName, size_t lineNumber, string_view message)
 This function is called by Kanzi to store the message to the log. More...
 
virtual ~AbstractLogger ()
 Destructor. More...
 

Protected Member Functions

virtual void writeOverride (LogLevel level, string_view levelName, string_view categoryName, string_view fileName, size_t lineNumber, string_view message) KZ_OVERRIDE
 Writes log message using registered loggers. More...
 

Detailed Description

Provides interface to write log messages to multiple loggers.

Member Typedef Documentation

Typedef of vector holding kanzi::AbstractLogger unique pointers.

Member Function Documentation

void kanzi::detail::ChainedLogger::push ( AbstractLogger logger)

Registers new logger.

Parameters
loggerNew logger.
void kanzi::detail::ChainedLogger::pop ( )
inline

Removes last registered logger.

void kanzi::detail::ChainedLogger::popAll ( )
inline

Removes all registered loggers.

virtual void kanzi::detail::ChainedLogger::writeOverride ( LogLevel  level,
string_view  levelName,
string_view  categoryName,
string_view  fileName,
size_t  lineNumber,
string_view  message 
)
protectedvirtual

Writes log message using registered loggers.

See kanzi::AbstractLogger::writeOverride for details.

Parameters
levelThe log level of the message.
levelNameThe string representation of log level.
categoryNameThe string representation of log category.
fileNameThe name of the file log message is originated from.
lineNumberThe line number of the place in file where log message is originated.
messageThe message being written to the log.

Implements kanzi::AbstractLogger.


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