|
MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
|
Logging interface for MeshX with color-coded output. More...
#include <stdio.h>#include <stdarg.h>#include <stdint.h>#include <stdbool.h>#include "meshx_err.h"#include "module_id.h"#include "interface/utils/meshx_tiny_printf.h"Go to the source code of this file.
Data Structures | |
| struct | meshx_logging_t |
| struct | meshx_log_packet_t |
| TLV Log Packet structure. More... | |
Typedefs | |
| typedef uint8_t | meshx_log_level_t |
Functions | |
| meshx_err_t | meshx_logging_init (const meshx_logging_t *config) |
| void | meshx_module_set_log_level (module_id_t module_id, meshx_log_level_t log_level) |
| void | meshx_log_packet (module_id_t module_id, meshx_log_level_t log_level, const char *file, int line_no, const char *fmt,...) |
| Logs a packetized binary log message. | |
| void | meshx_log_printf (module_id_t module_id, meshx_log_level_t log_level, const char *func, int line_no, const char *fmt,...) |
| Legacy printf-style logging for external components. | |
Logging interface for MeshX with color-coded output.
| #define CONFIG_MESHX_DEFAULT_LOG_LEVEL MESHX_LOG_INFO |
| #define CONFIG_MESHX_LOG_PRINTF meshx_tiny_printf |
| #define CONFIG_MESHX_LOG_THREADED 0 |
| #define MESHX_LOG | ( | module_id, | |
| level, | |||
| format, | |||
| ... ) |
| #define MESHX_LOG_COLOR | ( | COLOR | ) |
| #define MESHX_LOG_COLOR_BLACK "30" |
| #define MESHX_LOG_COLOR_BLUE "34" |
| #define MESHX_LOG_COLOR_BROWN "33" |
| #define MESHX_LOG_COLOR_CYAN "36" |
| #define MESHX_LOG_COLOR_D MESHX_LOG_COLOR(MESHX_LOG_COLOR_BLUE) |
| #define MESHX_LOG_COLOR_E MESHX_LOG_COLOR(MESHX_LOG_COLOR_RED) |
| #define MESHX_LOG_COLOR_GREEN "32" |
| #define MESHX_LOG_COLOR_I MESHX_LOG_COLOR(MESHX_LOG_COLOR_GREEN) |
| #define MESHX_LOG_COLOR_PURPLE "35" |
| #define MESHX_LOG_COLOR_RED "31" |
| #define MESHX_LOG_COLOR_RESET "\033[0m" |
| #define MESHX_LOG_COLOR_V MESHX_LOG_COLOR(MESHX_LOG_COLOR_RESET) |
| #define MESHX_LOG_COLOR_W MESHX_LOG_COLOR(MESHX_LOG_COLOR_BROWN) |
| #define MESHX_LOG_COLOR_WHITE "37" |
| #define MESHX_LOG_CONCAT | ( | a, | |
| b ) |
| #define MESHX_LOG_CONCAT_INNER | ( | a, | |
| b ) |
| #define MESHX_LOG_DEBUG 4 |
| #define MESHX_LOG_ERROR 1 |
| #define MESHX_LOG_GET_COLOR | ( | level | ) |
| #define MESHX_LOG_INFO 3 |
| #define MESHX_LOG_INTERNAL | ( | id, | |
| module_id, | |||
| level, | |||
| format, | |||
| arg0, | |||
| arg1, | |||
| arg2, | |||
| arg3, | |||
| arg4, | |||
| arg5, | |||
| arg6, | |||
| arg7, | |||
| arg8, | |||
| arg9, | |||
| arg10, | |||
| arg11, | |||
| arg12, | |||
| arg13, | |||
| arg14, | |||
| arg15, | |||
| ... ) |
| #define MESHX_LOG_MAX 6 |
| #define MESHX_LOG_NONE 0 |
| #define MESHX_LOG_STR_ATTR __attribute__((section(".meshx_log_str"), used)) |
| #define MESHX_LOG_SYNC_WORD 0xDEAD |
| #define MESHX_LOG_UNIQUE_ID __LINE__ |
| #define MESHX_LOG_VERBOSE 5 |
| #define MESHX_LOG_WARN 2 |
| #define MESHX_LOGD | ( | module_id, | |
| format, | |||
| ... ) |
| #define MESHX_LOGE | ( | module_id, | |
| format, | |||
| ... ) |
| #define MESHX_LOGI | ( | module_id, | |
| format, | |||
| ... ) |
| #define MESHX_LOGV | ( | module_id, | |
| format, | |||
| ... ) |
| #define MESHX_LOGW | ( | module_id, | |
| format, | |||
| ... ) |
| #define MESHX_STR | ( | x | ) |
| #define MESHX_STR_INNER | ( | x | ) |
| typedef uint8_t meshx_log_level_t |
| void meshx_log_packet | ( | module_id_t | module_id, |
| meshx_log_level_t | log_level, | ||
| const char * | file, | ||
| int | line_no, | ||
| const char * | fmt, | ||
| ... ) |
Logs a packetized binary log message.
| void meshx_log_printf | ( | module_id_t | module_id, |
| meshx_log_level_t | log_level, | ||
| const char * | func, | ||
| int | line_no, | ||
| const char * | fmt, | ||
| ... ) |
Legacy printf-style logging for external components.
| meshx_err_t meshx_logging_init | ( | const meshx_logging_t * | config | ) |
| void meshx_module_set_log_level | ( | module_id_t | module_id, |
| meshx_log_level_t | log_level ) |