The nrf_log module interface. More...
Modules | |
Logger configuration | |
Flash logger backend | |
Flash logger backend. | |
Logger backend interface | |
The nrf_log backend interface. | |
Log RTT backend | |
Log RTT backend. | |
Log UART backend | |
Log UART backend. | |
Functions for controlling nrf_log | |
The nrf_log control interface. | |
Functions for initializing and adding default backends | |
The nrf_log default backends. | |
Macros for logging on instance level | |
Macros for logging on instance level. | |
String formatter for the logger messages | |
Common part of serial backends | |
The nrf_log serial backend common put function. | |
Macros | |
#define | NRF_LOG_ERROR_STRING_GET(code) "" |
#define | NRF_LOG_LEVEL NRF_LOG_DEFAULT_LEVEL |
Severity level for the module. More... | |
#define | NRF_LOG_INITIAL_LEVEL NRF_LOG_LEVEL |
Initial severity if filtering is enabled. | |
#define | NRF_LOG_ERROR(...) NRF_LOG_INTERNAL_ERROR(__VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_WARNING(...) NRF_LOG_INTERNAL_WARNING( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_INFO(...) NRF_LOG_INTERNAL_INFO( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_DEBUG(...) NRF_LOG_INTERNAL_DEBUG( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_INST_ERROR(p_inst,...) NRF_LOG_INTERNAL_INST_ERROR(p_inst,__VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_INST_WARNING(p_inst,...) NRF_LOG_INTERNAL_INST_WARNING(p_inst,__VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_INST_INFO(p_inst,...) NRF_LOG_INTERNAL_INST_INFO(p_inst, __VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_INST_DEBUG(p_inst,...) NRF_LOG_INTERNAL_INST_DEBUG(p_inst, __VA_ARGS__) |
Macro for logging error messages for given module instance. It takes a printf-like, formatted string with up to seven arguments. More... | |
#define | NRF_LOG_RAW_INFO(...) NRF_LOG_INTERNAL_RAW_INFO( __VA_ARGS__) |
Macro for logging a formatted string without any prefix or timestamp. | |
#define | NRF_LOG_HEXDUMP_ERROR(p_data, len) NRF_LOG_INTERNAL_HEXDUMP_ERROR(p_data, len) |
Macro for logging raw bytes. More... | |
#define | NRF_LOG_HEXDUMP_WARNING(p_data, len) NRF_LOG_INTERNAL_HEXDUMP_WARNING(p_data, len) |
Macro for logging raw bytes. More... | |
#define | NRF_LOG_HEXDUMP_INFO(p_data, len) NRF_LOG_INTERNAL_HEXDUMP_INFO(p_data, len) |
Macro for logging raw bytes. More... | |
#define | NRF_LOG_HEXDUMP_DEBUG(p_data, len) NRF_LOG_INTERNAL_HEXDUMP_DEBUG(p_data, len) |
Macro for logging raw bytes. More... | |
#define | NRF_LOG_HEXDUMP_INST_ERROR(p_inst, p_data, len) NRF_LOG_INTERNAL_HEXDUMP_INST_ERROR(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance. More... | |
#define | NRF_LOG_HEXDUMP_INST_WARNING(p_inst, p_data, len) NRF_LOG_INTERNAL_HEXDUMP_INST_WARNING(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance. More... | |
#define | NRF_LOG_HEXDUMP_INST_INFO(p_inst, p_data, len) NRF_LOG_INTERNAL_HEXDUMP_INST_INFO(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance. More... | |
#define | NRF_LOG_HEXDUMP_INST_DEBUG(p_inst, p_data, len) NRF_LOG_INTERNAL_HEXDUMP_INST_DEBUG(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance. More... | |
#define | NRF_LOG_RAW_HEXDUMP_INFO(p_data, len) NRF_LOG_INTERNAL_RAW_HEXDUMP_INFO(p_data, len) |
Macro for logging hexdump without any prefix or timestamp. | |
#define | NRF_LOG_PUSH(_str) NRF_LOG_INTERNAL_LOG_PUSH(_str) |
Macro for copying a string to internal logger buffer if logs are deferred. More... | |
#define | NRF_LOG_FLOAT_MARKER "%s%d.%02d" |
Macro to be used in a formatted string to a pass float number to the log. More... | |
#define | NRF_LOG_FLOAT(val) |
Macro for dissecting a float number into two numbers (integer and residuum). More... | |
#define | NRF_LOG_MODULE_REGISTER() NRF_LOG_INTERNAL_MODULE_REGISTER() |
Macro for registering an independent module. More... | |
Functions | |
char const * | nrf_log_push (char *const p_str) |
Function for copying a string to the internal logger buffer if logs are deferred. More... | |
The nrf_log module interface.
#define NRF_LOG_DEBUG | ( | ... | ) | NRF_LOG_INTERNAL_DEBUG( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments.
This macro is compiled only if NRF_LOG_LEVEL includes debug logs.
#define NRF_LOG_ERROR | ( | ... | ) | NRF_LOG_INTERNAL_ERROR(__VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
#define NRF_LOG_FLOAT | ( | val | ) |
Macro for dissecting a float number into two numbers (integer and residuum).
#define NRF_LOG_FLOAT_MARKER "%s%d.%02d" |
Macro to be used in a formatted string to a pass float number to the log.
Use this macro in a formatted string instead of the f specifier together with NRF_LOG_FLOAT macro. Example: NRF_LOG_INFO("My float number" NRF_LOG_FLOAT_MARKER "\r\n", NRF_LOG_FLOAT(f)))
#define NRF_LOG_HEXDUMP_DEBUG | ( | p_data, | |
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_DEBUG(p_data, len) |
Macro for logging raw bytes.
This macro is compiled only if NRF_LOG_LEVEL includes debug logs.
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_ERROR | ( | p_data, | |
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_ERROR(p_data, len) |
Macro for logging raw bytes.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_INFO | ( | p_data, | |
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_INFO(p_data, len) |
Macro for logging raw bytes.
This macro is compiled only if NRF_LOG_LEVEL includes info logs.
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_INST_DEBUG | ( | p_inst, | |
p_data, | |||
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_INST_DEBUG(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
p_inst | Pointer to the instance with logging support. |
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_INST_ERROR | ( | p_inst, | |
p_data, | |||
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_INST_ERROR(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
p_inst | Pointer to the instance with logging support. |
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_INST_INFO | ( | p_inst, | |
p_data, | |||
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_INST_INFO(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
p_inst | Pointer to the instance with logging support. |
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_INST_WARNING | ( | p_inst, | |
p_data, | |||
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_INST_WARNING(p_inst, p_data, len) |
Macro for logging raw bytes for a specific module instance.
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
p_inst | Pointer to the instance with logging support. |
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_HEXDUMP_WARNING | ( | p_data, | |
len | |||
) | NRF_LOG_INTERNAL_HEXDUMP_WARNING(p_data, len) |
Macro for logging raw bytes.
This macro is compiled only if NRF_LOG_LEVEL includes warning logs.
p_data | Pointer to data. |
len | Data length in bytes. |
#define NRF_LOG_INFO | ( | ... | ) | NRF_LOG_INTERNAL_INFO( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments.
This macro is compiled only if NRF_LOG_LEVEL includes info logs.
#define NRF_LOG_INST_DEBUG | ( | p_inst, | |
... | |||
) | NRF_LOG_INTERNAL_INST_DEBUG(p_inst, __VA_ARGS__) |
Macro for logging error messages for given module instance. It takes a printf-like, formatted string with up to seven arguments.
p_inst | Pointer to the instance with logging support. |
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
#define NRF_LOG_INST_ERROR | ( | p_inst, | |
... | |||
) | NRF_LOG_INTERNAL_INST_ERROR(p_inst,__VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments.
p_inst | Pointer to the instance with logging support. |
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
#define NRF_LOG_INST_INFO | ( | p_inst, | |
... | |||
) | NRF_LOG_INTERNAL_INST_INFO(p_inst, __VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments.
p_inst | Pointer to the instance with logging support. |
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
#define NRF_LOG_INST_WARNING | ( | p_inst, | |
... | |||
) | NRF_LOG_INTERNAL_INST_WARNING(p_inst,__VA_ARGS__) |
Macro for logging error messages for a given module instance. It takes a printf-like, formatted string with up to seven arguments.
p_inst | Pointer to the instance with logging support. |
This macro is compiled only if NRF_LOG_LEVEL includes error logs.
#define NRF_LOG_LEVEL NRF_LOG_DEFAULT_LEVEL |
Severity level for the module.
The severity level can be defined in a module to override the default.
#define NRF_LOG_MODULE_REGISTER | ( | ) | NRF_LOG_INTERNAL_MODULE_REGISTER() |
Macro for registering an independent module.
Registration creates set of dynamic (RAM) and constant variables associated with the module.
#define NRF_LOG_PUSH | ( | _str | ) | NRF_LOG_INTERNAL_LOG_PUSH(_str) |
Macro for copying a string to internal logger buffer if logs are deferred.
_str | String. |
#define NRF_LOG_WARNING | ( | ... | ) | NRF_LOG_INTERNAL_WARNING( __VA_ARGS__) |
Macro for logging error messages. It takes a printf-like, formatted string with up to seven arguments.
This macro is compiled only if NRF_LOG_LEVEL includes warning logs.
char const* nrf_log_push | ( | char *const | p_str | ) |
Function for copying a string to the internal logger buffer if logs are deferred.
Use this function to store a string that is volatile (for example allocated on stack) or that may change before the deferred logs are processed. Such string is copied into the internal logger buffer (see NRF_LOG_STR_PUSH_BUFFER_SIZE).
p_str | Pointer to the user string. |