12345678910111213141516171819202122232425 |
- /*
- * Common.h
- *
- * Created on: 2021年8月7日
- * Author: Wendell
- */
- #ifndef COMMON_H_
- #define COMMON_H_
- #include <time.h>
- #define LOG_INFO(format, args...) StoreSysLogMsg("[%s:%4d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- #define LOG_WARN(format, args...) StoreSysLogMsg("[%s:%4d][%s][Warn] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- #define LOG_ERROR(format, args...) StoreSysLogMsg("[%s:%4d][%s][Erro] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- #define LOG_DBG(format, args...) StoreSysLogMsg("[%s:%4d][%s][Debg] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- #define PSU_LOG(format, args...) StorePsuLogMsg("[%s:%4d][%s][Info] "format, (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__), __LINE__, __FUNCTION__, ##args)
- int StoreSysLogMsg(const char *fmt, ...);
- int StorePsuLogMsg(const char *fmt, ...);
- void GetClockTime(struct timespec *_now_time);
- unsigned long GetTimeoutValue(struct timespec _start_time);
- unsigned long GetSecTimeoutValue(struct timespec _start_time);
- #endif /* COMMON_H_ */
|