log.h 548 B

1234567891011121314151617181920212223
  1. #ifndef __LOG_H_
  2. #define __LOG_H_
  3. #include "lsapi_sys.h"
  4. typedef enum{
  5. LINFO,
  6. LWARN,
  7. LERR
  8. }LOG_ENUM;
  9. void ologShow(char level, char fa, char * fmt, ...);
  10. #if 1
  11. #define MSG_INFO(fa,...) ologShow(LINFO,fa, ##__VA_ARGS__)
  12. #define MSG_WARN(fa,...) ologShow(LWARN,fa, ##__VA_ARGS__)
  13. #define MSG_ERR(fa,...) ologShow(LERR,fa, ##__VA_ARGS__)
  14. #else
  15. #define MSG_INFO(fa,...) LSAPI_Log_Debug(__VA_ARGS__)
  16. #define MSG_WARN(fa,...) LSAPI_Log_Debug(__VA_ARGS__)
  17. #define MSG_ERR(fa,...) LSAPI_Log_Debug(__VA_ARGS__)
  18. #endif
  19. #define MSG_DEBUG(fa,...)
  20. #endif