37#if XF_LOG_STDDEF_IS_ENABLE
40typedef long unsigned int size_t;
43#if XF_LOG_STDINT_IS_ENABLE
46typedef unsigned int uint32_t;
47typedef unsigned char uint8_t;
63#define XF_LOG_LVL_NONE (0)
64#define XF_LOG_LVL_USER (1)
65#define XF_LOG_LVL_ERROR (2)
66#define XF_LOG_LVL_WARN (3)
67#define XF_LOG_LVL_INFO (4)
68#define XF_LOG_LVL_DEBUG (5)
69#define XF_LOG_LVL_VERBOSE (6)
92typedef void (*
xf_log_out_t)(
const char *str,
size_t len,
void *arg);
124#if XF_LOG_FILTER_IS_ENABLE
221size_t xf_log(uint8_t level,
const char *tag,
const char *file, uint32_t line,
const char *func,
const char *fmt, ...);
234#define xf_log_level(level, tag, fmt, ...) xf_log(level, tag, __FILE__, __LINE__, __func__, fmt XF_LOG_NEWLINE, ##__VA_ARGS__)
void xf_log_set_filter_enable(int log_obj_id)
启用过滤器
void xf_log_set_time_func(xf_log_time_func_t log_time_func)
设置log的时间戳打印函数
void xf_log_set_filter_disable(int log_obj_id)
禁用过滤器
size_t xf_log(uint8_t level, const char *tag, const char *file, uint32_t line, const char *func, const char *fmt,...)
log打印函数
void xf_log_set_filter_file(int log_obj_id, const char *file)
设置过滤器的文件过滤
void xf_log_set_info_level(int log_obj_id, uint8_t level)
显示文件函数等信息的最小等级
void xf_log_set_filter_is_whitelist(int log_obj_id)
设置过滤器为白名单(仅其内容将被暴露)
void xf_log_set_filter_level(int log_obj_id, uint8_t level)
设置过滤器的等级过滤
void xf_log_set_filter_colorful_disable(int log_obj_id)
关闭彩色显示
void xf_log_set_filter_tag(int log_obj_id, const char *tag)
设置过滤器的标签过滤
void xf_log_set_filter_colorful_enable(int log_obj_id)
开启彩色显示
void xf_log_set_filter_is_blacklist(int log_obj_id)
设置过滤器为黑名单(其内容将被过滤)
int xf_log_register_obj(xf_log_out_t out_func, void *user_args)
注册log后端是输出到哪里,其最大值受到 XF_LOG_OBJ_MAX 的限制
void(* xf_log_out_t)(const char *str, size_t len, void *arg)
log 输出后端原型。
uint32_t(* xf_log_time_func_t)(void)
log 时间戳原型。
#define xf_log_printf(format,...)