qvvr has bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user