#ifndef SystemLogMessage_H #define SystemLogMessage_H /*SystemLog message*/ #define SystemLogMessage //for engineer to do analysis //#define ConsloePrintLog //System Log #if SAVE_SYS_LOG_MSG_EVCOMM_SWITCH == ENABLE #define SAVE_SYS_LOG_MSG_EVCOMM(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #else #define SAVE_SYS_LOG_MSG_EVCOMM(...) #endif //Debug Message #if DEBUG_PRINTF_EVCOMM_SHOW == ENABLE //Brief Messages #if DEBUG_PRINTF_EVCOMM_BRIEF_SHOW == ENABLE #define DEBUG_PRINTF_EVCOMM_BRIEF(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #else #define DEBUG_PRINTF_EVCOMM_BRIEF(...) #endif //Detail Messages #if DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE #define DEBUG_PRINTF_EVCOMM_DETAIL(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #else #define DEBUG_PRINTF_EVCOMM_DETAIL(...) #endif //System Log Messages #if DEBUG_PRINTF_EVCOMM_SYSTEM_LOG_SHOW == ENABLE #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args) #else #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(...) #endif #else #define DEBUG_PRINTF_EVCOMM_BRIEF(...) #define DEBUG_PRINTF_EVCOMM_DETAIL(...) #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(...) #endif #define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args) #define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args) #define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args) int StoreLogMsg(const char *fmt, ...); #endif