log.h 607 B

123456789101112
  1. #ifndef _LOG_H_
  2. #define _LOG_H_
  3. //------------------------------------------------------------------------------
  4. #define log_info(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
  5. #define log_warn(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
  6. #define log_error(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
  7. //------------------------------------------------------------------------------
  8. int StoreLogMsg(const char *fmt, ...);
  9. #endif /* _LOG_H_ */