kanzi::detail::StringLogger Class Reference

Stores log messages in a string for later retreival by error reporting subsystem. More...

#include <kanzi/core/legacy/debug/kzs_error.hpp>

Inheritance diagram for kanzi::detail::StringLogger:
kanzi::AbstractLogger

Public Member Functions

const char * c_str () const
 Returns C string representation of logged messages. 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)
 Implement this function in inherited class to store the message to the log. More...
 

Detailed Description

Stores log messages in a string for later retreival by error reporting subsystem.

This class is used internally by error subsystem to convert formatted error messages to string for later use for logging and/or exception error object creation. Error reporting subsystem keeps latest exception/error message to be retrieved later by tool module through kzsErrorGetLastExceptionMessage().

Member Function Documentation

const char* kanzi::detail::StringLogger::c_str ( ) const
inline

Returns C string representation of logged messages.

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

Implement this function in inherited class to store the message to the log.

It is transparent to Kanzi how this function stores the messages to the log.

Parameters
levelThe log level of the message.
levelNameThe string representation of the log level.
categoryNameThe string representation of the log category.
fileNameThe file name where the log message is originated.
lineNumberThe line number where the log message is originated.
messageThe log message.

Implements kanzi::AbstractLogger.


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