|
EM-ODP
3.7.0
Event Machine on ODP
|
Go to the documentation of this file.
43 #define INTERNAL_ERROR(error, escope, fmt, ...) \
44 internal_error((error), (escope), __FILE__, __func__, \
45 __LINE__, fmt, ## __VA_ARGS__)
50 #define RETURN_ERROR_IF(cond, error, escope, fmt, ...) \
52 if (unlikely((cond))) { \
53 return INTERNAL_ERROR((error), (escope), \
54 fmt, ## __VA_ARGS__); \
58 #define EM_LOG(level, fmt, ...) \
60 em_log_func_t log_fn = em_locm.log_fn; \
62 log_fn((level), fmt, ## __VA_ARGS__); \
64 em_shm->log_fn((level), fmt, ## __VA_ARGS__); \
67 #define EM_VLOG(level, fmt, args) \
69 em_vlog_func_t vlog_fn = em_locm.vlog_fn; \
71 vlog_fn((level), fmt, (args)); \
73 em_shm->vlog_fn((level), fmt, (args)); \
76 #define EM_PRINT(fmt, ...) EM_LOG(EM_LOG_PRINT, fmt, ## __VA_ARGS__)
81 #define EM_DBG(fmt, ...) \
83 if (EM_DEBUG_PRINT == 1) \
84 EM_LOG(EM_LOG_DBG, fmt, ##__VA_ARGS__); \
111 load_global_err_cnt(
void);
113 ODP_PRINTF_FORMAT(2, 3)
117 vdefault_log(
em_log_level_t level, const
char *fmt, va_list args);
int(* em_log_func_t)(em_log_level_t level, const char *fmt,...) __attribute__((format(printf
em_status_t internal_error(em_status_t error, em_escope_t escope,...)
em_status_t select_error_handler(em_status_t error, em_escope_t escope, va_list args_list)
int(*) typedef int(* em_vlog_func_t)(em_log_level_t level, const char *fmt, va_list args)
em_status_t default_error_handler(em_eo_t eo, em_status_t error, em_escope_t escope, va_list args)