XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_log_uitls.h
浏览该文件的文档.
1
12#ifndef __XF_LOG_UITLS_H__
13#define __XF_LOG_UITLS_H__
14
15/* ==================== [Includes] ========================================== */
16
17#include "xf_log_utils_config.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/* ==================== [Defines] =========================================== */
24
25#if XF_LOG_LEVEL >= XF_LOG_USER
26# define XF_LOGU(tag, format, ...) xf_log_level(XF_LOG_LVL_USER, tag, format, ##__VA_ARGS__)
27#else
28# define XF_LOGU(tag, format, ...) (void)(tag)
29#endif
30
31#if XF_LOG_LEVEL >= XF_LOG_ERROR
32# define XF_LOGE(tag, format, ...) xf_log_level(XF_LOG_LVL_ERROR, tag, format, ##__VA_ARGS__)
33#else
34# define XF_LOGE(tag, format, ...) (void)(tag)
35#endif
36
37#if XF_LOG_LEVEL >= XF_LOG_WARN
38# define XF_LOGW(tag, format, ...) xf_log_level(XF_LOG_LVL_WARN, tag, format, ##__VA_ARGS__)
39#else
40# define XF_LOGW(tag, format, ...) (void)(tag)
41#endif
42
43#if XF_LOG_LEVEL >= XF_LOG_INFO
44# define XF_LOGI(tag, format, ...) xf_log_level(XF_LOG_LVL_INFO, tag, format, ##__VA_ARGS__)
45#else
46# define XF_LOGI(tag, format, ...) (void)(tag)
47#endif
48
49#if XF_LOG_LEVEL >= XF_LOG_DEBUG
50# define XF_LOGD(tag, format, ...) xf_log_level(XF_LOG_LVL_DEBUG, tag, format, ##__VA_ARGS__)
51#else
52# define XF_LOGD(tag, format, ...) (void)(tag)
53#endif
54
55#if XF_LOG_LEVEL >= XF_LOG_VERBOSE
56# define XF_LOGV(tag, format, ...) xf_log_level(XF_LOG_LVL_VERBOSE, tag, format, ##__VA_ARGS__)
57#else
58# define XF_LOGV(tag, format, ...) (void)(tag)
59#endif
60
61/* ==================== [Typedefs] ========================================== */
62
63/* ==================== [Global Prototypes] ================================= */
64
65/* ==================== [Macros] ============================================ */
66
67#ifdef __cplusplus
68} /* extern "C" */
69#endif
70
71#endif // __XF_LOG_UITLS_H__