This class represents a log record that accumulates multiple log messages and writes them to the logger as a single message when the object of this class is destroyed.
More...
#include <kanzi/core/log/log_record.hpp>
This class represents a log record that accumulates multiple log messages and writes them to the logger as a single message when the object of this class is destroyed.
This class is used internally by the Logging subsystem. The object of this class is to accumulate multiple log messages with the same log level and log category. The log messages are written to the logger when the object is destroyed. You pass the logger to this class as a constructor parameter.
| kanzi::detail::LogRecord::LogRecord |
( |
AbstractLogger & |
logger, |
|
|
LogLevel |
level, |
|
|
string_view |
levelName, |
|
|
string_view |
categoryName, |
|
|
string_view |
fileName, |
|
|
size_t |
lineNumber |
|
) |
| |
|
inlineexplicit |
Constructor.
Constructs the Log Record object.
- Parameters
-
| logger | The logger to be used to write the log messages. |
| level | The log level of the message. |
| levelName | The string representation of the log level. |
| categoryName | The string representation of the log category. |
| fileName | The name of the file from which the log message originated. |
| lineNumber | The number of the line on which the log message originated. |
| kanzi::detail::LogRecord::~LogRecord |
( |
| ) |
|
|
inline |
Writes accumulated log messages to the logger.
template<typename T >
| void kanzi::detail::LogRecord::appendMessage |
( |
const T & |
value | ) |
|
|
inline |
Appends a single value message to the log storage.
- Parameters
-
| value | The value to be converted to string and added to the log storage. |
The documentation for this class was generated from the following file: