Contents
ClogLog() function and CLOG macro
The ClogLog()
function writes to the log.
The ClogLog()
function is intended for use in C-language programs. In C++ programs, use the Logger::Log() function or LOG_* macros.
A description of the ClogLog()
function and macros for quick access to it are provided in the file /opt/KasperskyOS-Community-Edition-<version>/sysroot-*-kos/include/component/logrr/clog/clog.h
.
component/logrr/clog/clog.h (fragment)
Parameters of the ClogLog()
function:
level
- Log level
LogrrLogLevel
. file
- File name.
line
- Number of the line in the file.
func
- Function name.
message
- Message text or message text formatting string.
...
- Parameters to be inserted into the
message
formatting string.
Macro for quick access to the ClogLog() function
Instead of calling the ClogLog()
function, you can use the macro whose description is provided in the file component/logrr/clog/clog.h
. This macros is variadic (takes a variable number of parameters), which lets you avoid specifying all parameters of the ClogLog()
function. When calling this macro, you only need to specify the log level and message text or the message formatting string with the values of parameters. The applied log level
is determined by the first parameter of the macro. An example of using this macro is provided in the section titled Using macros to send messages to a log.