48#define SPA_LOGF_DEBUG_INIT(_l,_lev,_t,_file,_line,_func) \
49 (struct spa_debug_log_ctx){ { spa_debug_log_log }, _l, _lev, _t, \
52#define SPA_LOGT_DEBUG_INIT(_l,_lev,_t) \
53 SPA_LOGF_DEBUG_INIT(_l,_lev,_t,__FILE__,__LINE__,__func__)
55#define SPA_LOG_DEBUG_INIT(l,lev) \
56 SPA_LOGT_DEBUG_INIT(l,lev,SPA_LOG_TOPIC_DEFAULT)
58#define spa_debug_log_pod(l,lev,indent,info,pod) \
60 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
61 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
62 spa_debugc_pod(&c.ctx, indent, info, pod); \
65#define spa_debug_log_format(l,lev,indent,info,format) \
67 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
68 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
69 spa_debugc_format(&c.ctx, indent, info, format); \
72#define spa_debug_log_mem(l,lev,indent,data,len) \
74 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
75 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
76 spa_debugc_mem(&c.ctx, indent, data, len); \
79#define spa_debug_log_dict(l,lev,indent,dict) \
81 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
82 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
83 spa_debugc_dict(&c.ctx, indent, dict); \
static void spa_debug_log_log(struct spa_debug_context *ctx, const char *fmt,...)
Definition log.h:44
spa_log_level
Definition log.h:45
#define spa_log_logtv(l, lev, topic,...)
Definition log.h:250
#define SPA_CONTAINER_OF(p, t, m)
Definition defs.h:208
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition defs.h:273
const char * func
Definition log.h:40
int line
Definition log.h:39
struct spa_log * log
Definition log.h:35
enum spa_log_level level
Definition log.h:36
struct spa_debug_context ctx
Definition log.h:34
const char * file
Definition log.h:38
const struct spa_log_topic * topic
Definition log.h:37
Identifier for a topic.
Definition log.h:83