25#ifndef SPA_DEBUG_LOG_H
26#define SPA_DEBUG_LOG_H
64#define SPA_LOGF_DEBUG_INIT(_l,_lev,_t,_file,_line,_func) \
65 (struct spa_debug_log_ctx){ { spa_debug_log_log }, _l, _lev, _t, \
68#define SPA_LOGT_DEBUG_INIT(_l,_lev,_t) \
69 SPA_LOGF_DEBUG_INIT(_l,_lev,_t,__FILE__,__LINE__,__func__)
71#define SPA_LOG_DEBUG_INIT(l,lev) \
72 SPA_LOGT_DEBUG_INIT(l,lev,SPA_LOG_TOPIC_DEFAULT)
74#define spa_debug_log_pod(l,lev,indent,info,pod) \
76 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
77 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
78 spa_debugc_pod(&c.ctx, indent, info, pod); \
81#define spa_debug_log_format(l,lev,indent,info,format) \
83 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
84 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
85 spa_debugc_format(&c.ctx, indent, info, format); \
88#define spa_debug_log_mem(l,lev,indent,data,len) \
90 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
91 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
92 spa_debugc_mem(&c.ctx, indent, data, len); \
static void spa_debug_log_log(struct spa_debug_context *ctx, const char *fmt,...)
Definition: spa/include/spa/debug/log.h:60
spa_log_level
Definition: spa/include/spa/support/log.h:65
#define spa_log_logtv(l, lev, topic,...)
Definition: spa/include/spa/support/log.h:268
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:289
Definition: spa/include/spa/debug/context.h:53
Definition: spa/include/spa/debug/log.h:49
const char * func
Definition: spa/include/spa/debug/log.h:56
int line
Definition: spa/include/spa/debug/log.h:55
struct spa_log * log
Definition: spa/include/spa/debug/log.h:51
enum spa_log_level level
Definition: spa/include/spa/debug/log.h:52
struct spa_debug_context ctx
Definition: spa/include/spa/debug/log.h:50
const char * file
Definition: spa/include/spa/debug/log.h:54
const struct spa_log_topic * topic
Definition: spa/include/spa/debug/log.h:53
Identifier for a topic.
Definition: spa/include/spa/support/log.h:103
Definition: spa/include/spa/support/log.h:81