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