1 #ifndef _TBM_EMULATOR_LOG_H
2 #define _TBM_EMULATOR_LOG_H
6 tbm_emulator_log_level_off = 0,
7 tbm_emulator_log_level_error = 1,
8 tbm_emulator_log_level_info = 2,
9 tbm_emulator_log_level_debug = 3,
10 } tbm_emulator_log_level;
12 void tbm_emulator_log_event(tbm_emulator_log_level log_level,
15 const char *format, ...);
17 int tbm_emulator_log_is_debug_enabled();
19 #define TBM_EMULATOR_LOG_DEBUG(format, ...) \
21 if (tbm_emulator_log_is_debug_enabled()) { \
22 tbm_emulator_log_event(tbm_emulator_log_level_debug, __FUNCTION__, __LINE__, format,##__VA_ARGS__); \
26 #define TBM_EMULATOR_LOG_INFO(format, ...) tbm_emulator_log_event(tbm_emulator_log_level_info, __FUNCTION__, __LINE__, format,##__VA_ARGS__)
27 #define TBM_EMULATOR_LOG_ERROR(format, ...) tbm_emulator_log_event(tbm_emulator_log_level_error, __FUNCTION__, __LINE__, format,##__VA_ARGS__)