Dataflow Runtime API  4.0.1.0
Static Public Member Functions | Static Public Attributes | List of all members
imt::base::dff::runtime::RuntimeLog Class Reference

Implementation of a simple centralized logging mechanism. More...

#include <Imt.Base.Dff.Runtime/RuntimeLog.h>

Static Public Member Functions

static void init (RuntimeCore::CoreHandle const loggerHandle)
 Initialize the logger. More...
 
static void setLogLevelThreshold (uint8_t const logLevelThreshold)
 Set the threshold of the highest logging level which is not filtered. More...
 
static void sendLog (uint8_t const logLevel, ::imt::base::core::serialization::SerializableIfc const &logMessage, size_t const logMessageSize)
 Send a log message if logLevel is <= LogLevelThreshold. More...
 

Static Public Attributes

static uint8_t const DEFAULT_LOG_LEVEL_THRESHOLD = UINT8_MAX
 The log level threshold is set tho this value for default. More...
 

Detailed Description

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).

Member Function Documentation

◆ init()

static void imt::base::dff::runtime::RuntimeLog::init ( RuntimeCore::CoreHandle const  loggerHandle)
static

Initialize the logger.

Parameters
loggerHandleHandle of the logger which receives the logging messages.

◆ sendLog()

static void imt::base::dff::runtime::RuntimeLog::sendLog ( uint8_t const  logLevel,
::imt::base::core::serialization::SerializableIfc const &  logMessage,
size_t const  logMessageSize 
)
static

Send a log message if logLevel is <= LogLevelThreshold.

If logger is not initialized the message will be discarded.

Parameters
logLevelLogging level of the given log message.
logMessageLog message.
logMessageSizesize of log message in bytes

◆ setLogLevelThreshold()

static void imt::base::dff::runtime::RuntimeLog::setLogLevelThreshold ( uint8_t const  logLevelThreshold)
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).

Note
default threshold is set to DEFAULT_LOG_LEVEL_THRESHOLD.
Parameters
logLevelThresholdLogging level threshold.

Member Data Documentation

◆ DEFAULT_LOG_LEVEL_THRESHOLD

uint8_t const imt::base::dff::runtime::RuntimeLog::DEFAULT_LOG_LEVEL_THRESHOLD = UINT8_MAX
static

The log level threshold is set tho this value for default.


The documentation for this class was generated from the following file: