bef_effect_ai_log.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _LIC_UTILS_TT_LOG_H_
  2. #define _LIC_UTILS_TT_LOG_H_
  3. #ifdef __ANDROID__
  4. #include <android/log.h>
  5. #else
  6. #include <stdio.h>
  7. #endif
  8. #include "bef_effect_ai_public_define.h"
  9. BEF_SDK_API void bef_effect_ai_tob_print(int level, const char* logTag, const char *fmt, ...);
  10. #define BEF_EFFECT_AI_LOG_TAG "bef_effect_ai "
  11. #ifdef __ANDROID__
  12. #ifdef DEBUG
  13. #define LOGCV_I(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_INFO, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  14. #define LOGCV_W(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_WARN, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  15. #define LOGCV_D(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_DEBUG, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  16. #define LOGCV_E(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_ERROR, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  17. #else
  18. #define LOGCV_I(fmt, ...)
  19. #define LOGCV_W(fmt, ...)
  20. #define LOGCV_D(fmt, ...)
  21. #define LOGCV_E(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_ERROR, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  22. #endif
  23. #else
  24. #ifdef DEBUG
  25. #define LOGCV_I(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_INFO, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  26. #define LOGCV_W(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_WARN, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  27. #define LOGCV_D(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_DEBUG, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  28. #define LOGCV_E(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_ERROR, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  29. #else
  30. #define LOGCV_I(fmt, ...)
  31. #define LOGCV_W(fmt, ...)
  32. #define LOGCV_D(fmt, ...)
  33. #define LOGCV_E(fmt, ...) bef_effect_ai_tob_print(BEF_AI_LOG_LEVEL_ERROR, BEF_EFFECT_AI_LOG_TAG, fmt, ##__VA_ARGS__);
  34. #endif
  35. #endif
  36. #endif // _LIC_UTILS_TT_LOG_H_