STM Logging APIs.
Overview:
The logging APIs provide alternative path to log STM runtime data if desired.
STM Logger:
Logger correspond to a single process controlling logging execution. Logger is expected to launch and connect with Master before any Client connect to Master.
Alongside STM clients, STM master expects a Logger process to connect with it. STM Logger will block at the call to stmLoggerInit() until the STM master process has been launched.
Definition in file stm_logging.h.
Go to the source code of this file.
Data Structures | |
| struct | stmElementInfo_t |
| A singular event. More... | |
| struct | stmPerfInfo_t |
| A singular perfInfo event. More... | |
| struct | stmStateInfo_t |
| A singular State Manager event. More... | |
| struct | stmHeaderInfo_t |
| STM Log Header Information needed by STM Analytics. More... | |
Macros | |
| #define | STM_RESOURCE_NAME_MAX (41) |
| #define | STM_MAX_SCHEDULES (8) |
Typedefs | |
| typedef enum stmEventType_t | stmEventType_t |
| Types of Events logged by STM. More... | |
| typedef uint16_t | stmElementOptionalVal |
| typedef uint64_t | stmElementTimestamp |
| typedef int(* | stmLoggingEventCallback_t) (void *userdata, stmElementInfo_t *buf, size_t size) |
| Function signature for STM event log callbacks. More... | |
| typedef int(* | stmLoggingStateCallback_t) (void *userdata, stmStateInfo_t *buf, size_t size) |
| Function signature for STM state manager log callbacks. More... | |
| typedef int(* | stmLoggingPerfInfoCallback_t) (void *userdata, stmPerfInfo_t *buf, size_t size) |
| Function signature for perfInfo log Callbacks. More... | |
Functions | |
| STM_API stmErrorCode_t | stmLoggerInit (stmHeaderInfo_t *header) |
| Initialize STM logger context. More... | |
| STM_API stmErrorCode_t | stmLoggerInitWithDiscriminator (int32_t discriminator, stmHeaderInfo_t *header) |
| Initialize STM logger context with a discriminator. More... | |
| STM_API stmErrorCode_t | stmRegisterEventCallBack (stmLoggingEventCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a event buffer write. More... | |
| STM_API stmErrorCode_t | stmRegisterStateCallBack (stmLoggingStateCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a state buffer write. More... | |
| STM_API stmErrorCode_t | stmRegisterPerfInfoCallBack (stmLoggingPerfInfoCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a perfInfo buffer write. More... | |
| STM_API stmErrorCode_t | stmEnterLoggingLoop () |
| Enters logging loop which logs at a set frequency. More... | |
| STM_API stmErrorCode_t | stmLoggerFlush (void) |
| Flush all buffers to the callbacks. More... | |
| STM_API stmErrorCode_t | stmLoggerExit (void) |
| Cleans up STM logger context. More... | |