12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * Module_CCS.c
- *
- * Created on: 2020/03/16
- * Author: foluswen
- */
- #ifndef SystemLogMessage_H
- #define SystemLogMessage_H
- #define SystemLogMessage //for engineer to do analysis
- //#define ConsloePrintLog
- #define SAVE_SYS_LOG_MSG_EVCOMM
- //#define DEBUG_PRINTF_EVCOMM_DETAIL_SHOW
- // Normal debug Message
- #ifdef SAVE_SYS_LOG_MSG_EVCOMM
- #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)
- #else
- #define DEBUG_INFO(...)
- #define DEBUG_WARN(...)
- #define DEBUG_ERROR(...)
- #endif
- // Detail debug Message, will effect SLAC if enable
- #ifdef DEBUG_PRINTF_EVCOMM_DETAIL_SHOW
- #define DEBUG_PRINTF_EVCOMM_DETAIL(format, args...) StoreLogMsg("[%s:%d][%s][Detail] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- #else
- #define DEBUG_PRINTF_EVCOMM_DETAIL(...)
- #endif
- int StoreLogMsg(const char *fmt, ...);
- #endif
|