kanzi::detail::StringLogger Class Reference

Stores log messages in a string for later retrieval by the 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)
 Kanzi calls this function 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)
 To store the message to the log, implement this function in the inherited class. More...
 

Detailed Description

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

The error subsystem uses this class internally to convert formatted error messages to string for later use for logging and for creating exception error objects. The error reporting subsystem keeps the latest exception or 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

To store the message to the log, implement this function in the inherited class.

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 name of the file from which the log message originated.
lineNumberThe number of the line in the file from which the log message originated.
messageThe log message.

Implements kanzi::AbstractLogger.


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