qvvr has bug

This commit is contained in:
lnk
2025-05-20 16:31:12 +08:00
parent 093e8e5dd6
commit 3ad2e7c590
12 changed files with 314 additions and 44 deletions

View File

@@ -77,8 +77,26 @@ void log_warn(const char* key, const char* msg);
void log_error(const char* key, const char* msg);
void send_reply_to_kafka_c(const char* guid, const char* step, const char* result);
void format_log_msg(char* buf, size_t buf_size, const char* fmt, ...);
//宏定义
#define DIY_LOG(LEVEL_FUNC, KEY, ...) \
do { \
char buf[256]; \
format_log_msg(buf, sizeof(buf), __VA_ARGS__); \
LEVEL_FUNC(KEY, buf); \
} while (0)
#define DIY_ERRORLOG(KEY, ...) DIY_LOG(log_error, KEY, __VA_ARGS__)
#define DIY_WARNLOG(KEY, ...) DIY_LOG(log_warn, KEY, __VA_ARGS__)
#define DIY_INFOLOG(KEY, ...) DIY_LOG(log_info, KEY, __VA_ARGS__)
#define DIY_DEBUGLOG(KEY, ...) DIY_LOG(log_debug, KEY, __VA_ARGS__)
#ifdef __cplusplus
}
#endif
#endif // LOG4_H