|
@@ -1,48 +1,36 @@
|
|
|
+/*
|
|
|
+ * Module_CCS.c
|
|
|
+ *
|
|
|
+ * Created on: 2020/03/16
|
|
|
+ * Author: foluswen
|
|
|
+ */
|
|
|
#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)
|
|
|
+#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 SAVE_SYS_LOG_MSG_EVCOMM(...)
|
|
|
+ #define DEBUG_INFO(...)
|
|
|
+ #define DEBUG_WARN(...)
|
|
|
+ #define DEBUG_ERROR(...)
|
|
|
#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
|
|
|
+// 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_BRIEF(...)
|
|
|
- #define DEBUG_PRINTF_EVCOMM_DETAIL(...)
|
|
|
- #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(...)
|
|
|
+ #define DEBUG_PRINTF_EVCOMM_DETAIL(...)
|
|
|
#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, ...);
|
|
|
|