23#ifndef SPA_API_DEBUG_LOG
25 #define SPA_API_DEBUG_LOG SPA_API_IMPL
27 #define SPA_API_DEBUG_LOG static inline
56#define SPA_LOGF_DEBUG_INIT(_l,_lev,_t,_file,_line,_func) \
57 (struct spa_debug_log_ctx){ { spa_debug_log_log }, _l, _lev, _t, \
60#define SPA_LOGT_DEBUG_INIT(_l,_lev,_t) \
61 SPA_LOGF_DEBUG_INIT(_l,_lev,_t,__FILE__,__LINE__,__func__)
63#define SPA_LOG_DEBUG_INIT(l,lev) \
64 SPA_LOGT_DEBUG_INIT(l,lev,SPA_LOG_TOPIC_DEFAULT)
63#define SPA_LOG_DEBUG_INIT(l,lev) \ …
66#define spa_debug_log_pod(l,lev,indent,info,pod) \
68 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
69 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
70 spa_debugc_pod(&c.ctx, indent, info, pod); \
70 spa_debugc_pod(&c.ctx, indent, info, pod); \ …
73#define spa_debug_log_format(l,lev,indent,info,format) \
75 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
76 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
77 spa_debugc_format(&c.ctx, indent, info, format); \
73#define spa_debug_log_format(l,lev,indent,info,format) \ …
80#define spa_debug_log_mem(l,lev,indent,data,len) \
82 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
83 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
84 spa_debugc_mem(&c.ctx, indent, data, len); \
80#define spa_debug_log_mem(l,lev,indent,data,len) \ …
87#define spa_debug_log_dict(l,lev,indent,dict) \
89 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
90 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
91 spa_debugc_dict(&c.ctx, indent, dict); \
87#define spa_debug_log_dict(l,lev,indent,dict) \ …
94#define spa_debug_log_error_location(l,lev,loc,fmt,...) \
96 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
97 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) { \
98 if (fmt) spa_debugc(&c.ctx, fmt, __VA_ARGS__); \
99 spa_debugc_error_location(&c.ctx, loc); \
94#define spa_debug_log_error_location(l,lev,loc,fmt,...) \ …
uint32_t int int const char va_list args
Definition core.h:434
SPA_API_DEBUG_LOG void spa_debug_log_log(struct spa_debug_context *ctx, const char *fmt,...)
Definition log.h:54
spa_log_level
Definition log.h:55
SPA_API_LOG void spa_log_logtv(struct spa_log *l, enum spa_log_level level, const struct spa_log_topic *topic, const char *file, int line, const char *func, const char *fmt, va_list args)
Definition log.h:281
#define SPA_CONTAINER_OF(p, t, m)
Definition defs.h:235
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition defs.h:295
#define SPA_API_DEBUG_LOG
Definition log.h:34
const char * func
Definition log.h:50
int line
Definition log.h:49
struct spa_log * log
Definition log.h:45
enum spa_log_level level
Definition log.h:46
struct spa_debug_context ctx
Definition log.h:44
const char * file
Definition log.h:48
const struct spa_log_topic * topic
Definition log.h:47
Identifier for a topic.
Definition log.h:93