5 #ifndef SPA_DEBUG_LOG_H
6 #define SPA_DEBUG_LOG_H
44 #define SPA_LOGF_DEBUG_INIT(_l,_lev,_t,_file,_line,_func) \
45 (struct spa_debug_log_ctx){ { spa_debug_log_log }, _l, _lev, _t, \
48 #define SPA_LOGT_DEBUG_INIT(_l,_lev,_t) \
49 SPA_LOGF_DEBUG_INIT(_l,_lev,_t,__FILE__,__LINE__,__func__)
51 #define SPA_LOG_DEBUG_INIT(l,lev) \
52 SPA_LOGT_DEBUG_INIT(l,lev,SPA_LOG_TOPIC_DEFAULT)
54 #define spa_debug_log_pod(l,lev,indent,info,pod) \
56 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
57 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
58 spa_debugc_pod(&c.ctx, indent, info, pod); \
61 #define spa_debug_log_format(l,lev,indent,info,format) \
63 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
64 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
65 spa_debugc_format(&c.ctx, indent, info, format); \
68 #define spa_debug_log_mem(l,lev,indent,data,len) \
70 struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
71 if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
72 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:40
spa_log_level
Definition: spa/include/spa/support/log.h:45
#define spa_log_logtv(l, lev, topic,...)
Definition: spa/include/spa/support/log.h:248
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:269
Definition: spa/include/spa/debug/context.h:33
Definition: spa/include/spa/debug/log.h:29
const char * func
Definition: spa/include/spa/debug/log.h:36
int line
Definition: spa/include/spa/debug/log.h:35
struct spa_log * log
Definition: spa/include/spa/debug/log.h:31
enum spa_log_level level
Definition: spa/include/spa/debug/log.h:32
struct spa_debug_context ctx
Definition: spa/include/spa/debug/log.h:30
const char * file
Definition: spa/include/spa/debug/log.h:34
const struct spa_log_topic * topic
Definition: spa/include/spa/debug/log.h:33
Identifier for a topic.
Definition: spa/include/spa/support/log.h:83
Definition: spa/include/spa/support/log.h:61