OCT 1. 更正16进制日志打印宏定义

This commit is contained in:
黄昕 2023-05-15 17:39:00 +08:00
parent 664ba3505f
commit 84ab5cf3de
1 changed files with 14 additions and 14 deletions

View File

@ -64,7 +64,7 @@ typedef enum {
##__VA_ARGS__) ##__VA_ARGS__)
#define LOG_MSG(level, format, ...) LOG_MOD(level, ZLOG_MOD_MAIN, format, ##__VA_ARGS__) #define LOG_MSG(level, format, ...) LOG_MOD(level, ZLOG_MOD_MAIN, format, ##__VA_ARGS__)
#define LOG_MSG_HEX(level, format, ...) LOG_MOD_HEX(level, ZLOG_MOD_MAIN, format, ##__VA_ARGS__) #define LOG_MSG_HEX(level, buf, len) LOG_MOD_HEX(level, ZLOG_MOD_MAIN, (buf), (len))
#define LOG_MOD(level, mod, format, ...) \ #define LOG_MOD(level, mod, format, ...) \
do { \ do { \
@ -76,13 +76,13 @@ typedef enum {
} \ } \
} while (0) } while (0)
#define LOG_MOD_HEX(level, mod, format, ...) \ #define LOG_MOD_HEX(level, mod, buf, len) \
do { \ do { \
if (zlog_verify_level(level, mod)) { \ if (zlog_verify_level(level, mod)) { \
if (zlog_vni_tag_get()) { \ if (zlog_vni_tag_get()) { \
zlog_put_mdc("vni", zlog_vni_tag_get()); \ zlog_put_mdc("vni", zlog_vni_tag_get()); \
} \ } \
hzlog_##level(zlog_get_mod_cat((mod)), format, ##__VA_ARGS__); \ hzlog_##level(zlog_get_mod_cat((mod)), (buf), (len)); \
printf("\n"); \ printf("\n"); \
} \ } \
} while (0) } while (0)