Compact Logger#
API and Callbacks for the Compact Logger Component.
This component manages a compact logger that stores log entries encoded with a 2-byte enumeration. Another component must provide the encoding/decoding of the enumerations. This component stores log messages with the following: UTC Time, Time Synchronization, Log Message ID, and variable log message data. It stores the data in a ring-buffer stored in RAM. When space is needed, the oldest log message entries are deleted.
Modules#
EmberAfPluginCompactLoggerMessageInfo
API#
Initialize compact logger.
Add compact log.
Get log count.
Initialize compact logger iterator.
Get log message info by using the iterator.
Get log message data by using the iterator.
Compact logger iterator next entry.
Update all logs with UTC time.
Print all messages.
Get entry by number.
Check facility and severity.
Set facility.
Set severity.
Enumerations#
Typedefs#
Macros#
API Documentation#
emberAfPluginCompactLoggerInit#
void emberAfPluginCompactLoggerInit (void )
Initialize compact logger.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
emberAfPluginCompactLoggerAdd#
EmberStatus emberAfPluginCompactLoggerAdd (uint16_t logMessageId, uint16_t logDataLength, uint8_t * logData)
Add compact log.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | N/A | logMessageId | message id Ver.: always |
uint16_t | N/A | logDataLength | data length Ver.: always |
uint8_t * | N/A | logData | data Ver.: always |
Returns
EmberStatus status
emberAfPluginCompactLoggerGetLogCount#
uint16_t emberAfPluginCompactLoggerGetLogCount (void )
Get log count.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
uint16_t Log count
emberAfPluginCompactLoggerInitIterator#
EmberStatus emberAfPluginCompactLoggerInitIterator (void )
Initialize compact logger iterator.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
EmberStatus status
emberAfPluginCompactLoggerGetLogMessageInfoByIterator#
EmberStatus emberAfPluginCompactLoggerGetLogMessageInfoByIterator (EmberAfPluginCompactLoggerMessageInfo * info)
Get log message info by using the iterator.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberAfPluginCompactLoggerMessageInfo * | N/A | info | pointer to struct to store log info |
Returns
EmberStatus status code
emberAfPluginCompactLoggerGetLogMessageDataByIterator#
EmberStatus emberAfPluginCompactLoggerGetLogMessageDataByIterator (uint16_t indexIntoEntry, uint16_t maxMessageSize, uint16_t * returnDataSize, uint8_t * returnData)
Get log message data by using the iterator.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | N/A | indexIntoEntry | Ver.: always |
uint16_t | N/A | maxMessageSize | Ver.: always |
uint16_t * | N/A | returnDataSize | Ver.: always |
uint8_t * | N/A | returnData | Ver.: always |
Returns
EmberStatus status code
emberAfPluginCompactLoggerIteratorNextEntry#
EmberStatus emberAfPluginCompactLoggerIteratorNextEntry (void )
Compact logger iterator next entry.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
EmberStatus status code
emberAfPluginCompactLoggerUpdateAllLogsWithUtcTime#
EmberStatus emberAfPluginCompactLoggerUpdateAllLogsWithUtcTime (uint32_t currentUtcTimeSeconds)
Update all logs with UTC time.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | currentUtcTimeSeconds | UTC time in seconds Ver.: always |
Returns
EmberStatus status code
emberAfPluginCompactLoggerPrintAllMessages#
void emberAfPluginCompactLoggerPrintAllMessages (void )
Print all messages.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
emberAfPluginCompactLoggerGetEntryByNumber#
EmberStatus emberAfPluginCompactLoggerGetEntryByNumber (uint32_t entryNumber, EmberAfPluginCompactLoggerMessageInfo * info)
Get entry by number.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | entryNumber | |
EmberAfPluginCompactLoggerMessageInfo * | N/A | info | pointer to struct where info will be stored Ver.: always |
Returns
EmberStatus status code
emberAfPluginCompactLoggerCheckFacilityAndSeverity#
bool emberAfPluginCompactLoggerCheckFacilityAndSeverity (EmberCompactLoggerSeverity severity, uint16_t facility)
Check facility and severity.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberCompactLoggerSeverity | N/A | severity | Ver.: always |
uint16_t | N/A | facility | Ver.: always |
Returns
bool
emberAfPluginCompactLoggerSetFacility#
void emberAfPluginCompactLoggerSetFacility (uint16_t facility)
Set facility.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | N/A | facility | Ver.: always |
emberAfPluginCompactLoggerSetSeverity#
EmberStatus emberAfPluginCompactLoggerSetSeverity (EmberCompactLoggerSeverity severity)
Set severity.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberCompactLoggerSeverity | N/A | severity | Ver.: always |
Returns
EmberStatus status code
Enumeration Documentation#
EmberCompactLoggerSeverity#
EmberCompactLoggerSeverity
Enumerator | |
---|---|
EMBER_AF_PLUGIN_COMPACT_LOGGER_SEVERITY_CRITICAL | |
EMBER_AF_PLUGIN_COMPACT_LOGGER_SEVERITY_NOTICE | |
EMBER_AF_PLUGIN_COMPACT_LOGGER_SEVERITY_DEBUG |