LogIface class
The LogIface
class contains methods that let you incrementally build the text of a log entry from parts and then send the entry to the log with one call:
- The
SetLogLevel()
method is used to set the log level of sent messages. - The
Push()
method is used to add text to a message. - The
Flush()
method is used to send a message composed of one or morePush()
method calls to the log.When the
~LogIface()
destructor is called, the message composed ofPush()
calls is also sent to the log if the message was not previously sent usingFlush()
. - The
Log()
method is used to immediately send a separate message (without using the text composed ofPush()
calls).
To create a LogIface
class instance, pass one of the LogLevel
enumerators to the class constructor. An example of using functions of the LogIface
class is provided in the "Merging messages" subsection under Advanced capabilities when sending messages to a log.
A description of the LogIface
class is provided in the file /opt/KasperskyOS-Community-Edition-<version>/sysroot-*-kos/include/component/logrr/cpp/tools.h
.
component/logrr/cpp/tools.h (fragment)