63#define PAL_LOGI(tag, fmt, ...) printf("[I] %s: " fmt "\n", tag, ##__VA_ARGS__)
74#define PAL_LOGE(tag, fmt, ...) printf("[E] %s: " fmt "\n", tag, ##__VA_ARGS__)
85#define PAL_LOGW(tag, fmt, ...) printf("[W] %s: " fmt "\n", tag, ##__VA_ARGS__)
96#define PAL_LOGD(tag, fmt, ...) printf("[D] %s: " fmt "\n", tag, ##__VA_ARGS__)
107#define PAL_LOGV(tag, fmt, ...) printf("[V] %s: " fmt "\n", tag, ##__VA_ARGS__)
110#ifndef PAL_LOG_BUFFER_HEX
129#define PAL_LOG_BUFFER_HEX(tag, buf, len, level) \
131 const uint8_t *_b = (const uint8_t *)(buf); \
132 for (size_t _i = 0; _i < (len); _i += 16) { \
135 for (size_t _j = _i; _j < (len) && _j < _i + 16; _j++) \
136 _off += snprintf(_line + _off, sizeof(_line) - _off, "%02x ", _b[_j]); \
137 printf("[%s] %s: %s\n", _pal_level_str[level], tag, _line); \
142#ifndef PAL_LOG_BUFFER_HEXDUMP
155#define PAL_LOG_BUFFER_HEXDUMP(tag, buf, len, level) \
156 PAL_LOG_BUFFER_HEX(tag, buf, len, level)
static const char * _pal_level_str[]
Mapping table from pal_log_level_t to PAL log level prefixes.
Definition pal_log.h:117
pal_log_level_t
Log severity levels in ascending order of verbosity.
Definition pal_log.h:43
@ PAL_LOG_ERROR
Critical errors that require immediate attention.
Definition pal_log.h:44
@ PAL_LOG_DEBUG
Detailed debug information.
Definition pal_log.h:47
@ PAL_LOG_INFO
General informational messages.
Definition pal_log.h:46
@ PAL_LOG_VERBOSE
Highly verbose trace-level output.
Definition pal_log.h:48
@ PAL_LOG_WARN
Warnings about recoverable unexpected conditions.
Definition pal_log.h:45
ESP32 platform aliases for PAL logging macros.