Type Definitions#

Core type definitions for the logging system.

Modules#

sl_log_config_t

sl_log_ring_buffer_t

Enumerations#

enum
SL_LOG_ENUM_CONFIG_DEBUG = SL_LOG_CONFIG_LEVEL_DEBUG
SL_LOG_ENUM_CONFIG_INFO = SL_LOG_CONFIG_LEVEL_INFO
SL_LOG_ENUM_CONFIG_WARN = SL_LOG_CONFIG_LEVEL_WARN
SL_LOG_ENUM_CONFIG_ERROR = SL_LOG_CONFIG_LEVEL_ERROR
SL_LOG_ENUM_CONFIG_CRASH = SL_LOG_CONFIG_LEVEL_CRASH
SL_LOG_ENUM_CONFIG_NONE = SL_LOG_CONFIG_LEVEL_NONE
SL_LOG_ENUM_CONFIG_INVALID
}

Log level enumeration.

enum
SL_LOG_ENUM_CONFIG_ARG0 = SL_LOG_CONFIG_ARG0
SL_LOG_ENUM_CONFIG_ARG1
SL_LOG_ENUM_CONFIG_ARG2
SL_LOG_ENUM_CONFIG_ARG3
SL_LOG_ENUM_CONFIG_ARG4
SL_LOG_ENUM_CONFIG_ARG5
SL_LOG_ENUM_CONFIG_ARG6
SL_LOG_ENUM_CONFIG_ARG7
SL_LOG_ENUM_CONFIG_ARG8
SL_LOG_ENUM_CONFIG_ARG9
SL_LOG_ENUM_CONFIG_ARG10
SL_LOG_ENUM_CONFIG_ARG_INVALID
}

Maximum log arguments enumeration.

Variables#

typedef

Structure representing a single log event.

uint32_t

Unique event identifier (pointer to format string or numeric ID)

uint32_t

Array of arguments associated with the event (up to SL_LOG_CONFIG_ARG items)

uint8_t

Number of valid arguments in the args array (0 to SL_LOG_CONFIG_ARG)

uint8_t

Core identifier that generated the event (0 = host core)

uint8_t

Event flags - bits 1-7: log level, bit 0: event type (0=format string, 1=numeric)

uint8_t

Version of the logging component that generated this event.

Enumeration Documentation#

sl_log_level_t#

sl_log_level_t

Log level enumeration.

Defines the various log levels available in the system, from no logging to crash-level events. Higher numeric values indicate more critical events.

The log levels are hierarchical - enabling a higher level automatically includes all lower-numbered (more critical) levels.

Enumerator
SL_LOG_ENUM_CONFIG_DEBUG

Debug level - detailed debugging information.

SL_LOG_ENUM_CONFIG_INFO

Information level - general informational messages.

SL_LOG_ENUM_CONFIG_WARN

Warning level - warning conditions that should be noted.

SL_LOG_ENUM_CONFIG_ERROR

Error level - error conditions that affect functionality.

SL_LOG_ENUM_CONFIG_CRASH

Crash level - critical system failures.

SL_LOG_ENUM_CONFIG_NONE

No logging - all log messages are disabled.

SL_LOG_ENUM_CONFIG_INVALID

Invalid level - used for validation purposes.


sl_log_args_t#

sl_log_args_t

Maximum log arguments enumeration.

Defines the maximum number of arguments that can be passed to log functions. This setting affects memory usage and performance - higher values provide more flexibility but consume more resources.

Enumerator
SL_LOG_ENUM_CONFIG_ARG0

No arguments supported - string-only logging.

SL_LOG_ENUM_CONFIG_ARG1

Up to 1 argument supported.

SL_LOG_ENUM_CONFIG_ARG2

Up to 2 arguments supported.

SL_LOG_ENUM_CONFIG_ARG3

Up to 3 arguments supported.

SL_LOG_ENUM_CONFIG_ARG4

Up to 4 arguments supported.

SL_LOG_ENUM_CONFIG_ARG5

Up to 5 arguments supported.

SL_LOG_ENUM_CONFIG_ARG6

Up to 6 arguments supported.

SL_LOG_ENUM_CONFIG_ARG7

Up to 7 arguments supported.

SL_LOG_ENUM_CONFIG_ARG8

Up to 8 arguments supported.

SL_LOG_ENUM_CONFIG_ARG9

Up to 9 arguments supported.

SL_LOG_ENUM_CONFIG_ARG10

Up to 10 arguments supported.

SL_LOG_ENUM_CONFIG_ARG_INVALID

Invalid argument count - used for validation.


Variable Documentation#

__PACKED_STRUCT#

typedef __PACKED_STRUCT

Structure representing a single log event.

This structure contains all information for a single log event, including timing information, event identification, arguments, and metadata. Events are stored in a ring buffer and transmitted to the selected backend.

Note

  • The total size of this structure affects memory usage and should be kept as compact as possible for embedded systems.


event_id#

uint32_t event_id

Unique event identifier (pointer to format string or numeric ID)


args#

uint32_t args[SL_LOG_CONFIG_ARG]

Array of arguments associated with the event (up to SL_LOG_CONFIG_ARG items)


arg_count#

uint8_t arg_count

Number of valid arguments in the args array (0 to SL_LOG_CONFIG_ARG)


core_id#

uint8_t core_id

Core identifier that generated the event (0 = host core)


flags#

uint8_t flags

Event flags - bits 1-7: log level, bit 0: event type (0=format string, 1=numeric)


version#

uint8_t version

Version of the logging component that generated this event.


sl_log_event_t#

sl_log_event_t