![]() |
Dataflow Runtime API
3.0.3.0
|
Implementation of a simple centralized logging mechanism. More...
#include <Imt.Base.Dff.Runtime/RuntimeLog.h>
Static Public Member Functions | |
static void | init (const RuntimeCore::CoreHandle loggerHandle) |
Initialize the logger. More... | |
static void | setLogLevelThreshold (const uint8_t logLevelThreshold) |
Set the threshold of the highest logging level which is not filtered. More... | |
static void | sendLog (const uint8_t logLevel, const imt::base::core::serialization::SerializableIfc &logMessage, const size_t logMessageSize) |
Send a log message if logLevel is <= LogLevelThreshold. More... | |
Static Public Attributes | |
static const uint8_t | DEFAULT_LOG_LEVEL_THRESHOLD = UINT8_MAX |
The log level threshold is set tho this value for default. More... | |
Implementation of a simple centralized logging mechanism.
An Executable can be registered to receive the logging messages by passing its CoreHandle to the init function. The content of a logging message can be defined in application (derive from SerializableIfc). If no handler is registered, the message will be discarded. By default all log messages are send (log level threshold filter inactive).
|
static |
Initialize the logger.
loggerHandle | Handle of the logger which receives the logging messages. |
|
static |
Send a log message if logLevel is <= LogLevelThreshold.
If logger is not initialized the message will be discarded.
logLevel | Logging level of the given log message. |
logMessage | Log message. |
logMessageSize | size of log message in bytes |
|
static |
Set the threshold of the highest logging level which is not filtered.
A higher log level has a lower value (0 = highest log level, 255 = lowest log level).
logLevelThreshold | Logging level threshold. |
The log level threshold is set tho this value for default.