Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Go to the source code of this file.
Data Structures | |
struct | log_source_const_data |
Constant data associated with the source of log messages. More... | |
struct | log_source_dynamic_data |
Dynamic data associated with the source of log messages. More... | |
Macros | |
#define | LOG_OBJECT_PTR_INIT(_name, _object) |
Initialize pointer to logger instance with explicitly provided object. | |
#define | LOG_INSTANCE_PTR(_module_name, _inst_name) |
Get pointer to a logging instance. | |
#define | LOG_INSTANCE_PTR_INIT(_name, _module_name, _inst_name) |
Macro for initializing a pointer to the logger instance. | |
#define | LOG_INSTANCE_PTR_DECLARE(_name) |
Declare a logger instance pointer in the module structure. | |
#define | LOG_INSTANCE_REGISTER(_module_name, _inst_name, _level) |
Macro for registering instance for logging with independent filtering. | |
#define LOG_INSTANCE_PTR | ( | _module_name, | |
_inst_name ) |
Get pointer to a logging instance.
Instance is identified by _module_name
and _inst_name
.
_module_name | Module name. |
_inst_name | Instance name. |
#define LOG_INSTANCE_PTR_DECLARE | ( | _name | ) |
Declare a logger instance pointer in the module structure.
If logging is disabled then element in the structure is still declared to avoid compilation issues. If compiler supports zero length arrays then it is utilized to not use any space, else a byte array is created.
_name | Name of a structure element that will have a pointer to logging instance object. |
#define LOG_INSTANCE_PTR_INIT | ( | _name, | |
_module_name, | |||
_inst_name ) |
Macro for initializing a pointer to the logger instance.
_module_name
and _inst_name
are concatenated to form a name of the object.
Macro is intended to be used in user structure initializer to initialize a field in the structure that holds pointer to the logging instance. Structure field should be declared using LOG_INSTANCE_PTR_DECLARE
.
_name | Name of a structure element that have a pointer to logging instance object. |
_module_name | Module name. |
_inst_name | Instance name. |
#define LOG_INSTANCE_REGISTER | ( | _module_name, | |
_inst_name, | |||
_level ) |
Macro for registering instance for logging with independent filtering.
Module instance provides filtering of logs on instance level instead of module level. Instance create using this macro can later on be used with LOG_INSTANCE_PTR_INIT or referenced by LOG_INSTANCE_PTR.
_module_name | Module name. |
_inst_name | Instance name. |
_level | Initial static filtering. |
#define LOG_OBJECT_PTR_INIT | ( | _name, | |
_object ) |
Initialize pointer to logger instance with explicitly provided object.
Macro can be used to initialized a pointer with object that is not unique to the given instance, thus not created with LOG_INSTANCE_REGISTER.
_name | Name of the structure element for holding logging object. |
_object | Pointer to a logging instance object. |