58 #define SPA_TYPE_INTERFACE_Log SPA_TYPE_INFO_INTERFACE_BASE "Log" 64 #define SPA_VERSION_LOG 0 73 #define SPA_VERSION_LOG_METHODS 0 86 void (*log) (
void *object,
104 void (*logv) (
void *object,
113 #define spa_log_level_enabled(l,lev) ((l) && (l)->level >= (lev)) 115 #if defined(__USE_ISOC11) || defined(__USE_ISOC99) || \ 116 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) 118 #define spa_log_log(l,lev,...) \ 120 struct spa_log *_l = l; \ 121 if (SPA_UNLIKELY(spa_log_level_enabled(_l, lev))) \ 122 spa_interface_call(&_l->iface, \ 123 struct spa_log_methods, log, 0, lev, \ 127 #define spa_log_logv(l,lev,...) \ 129 struct spa_log *_l = l; \ 130 if (SPA_UNLIKELY(spa_log_level_enabled(_l, lev))) \ 131 spa_interface_call(&_l->iface, \ 132 struct spa_log_methods, logv, 0, lev, \ 136 #define spa_log_error(l,...) spa_log_log(l,SPA_LOG_LEVEL_ERROR,__FILE__,__LINE__,__func__,__VA_ARGS__) 137 #define spa_log_warn(l,...) spa_log_log(l,SPA_LOG_LEVEL_WARN,__FILE__,__LINE__,__func__,__VA_ARGS__) 138 #define spa_log_info(l,...) spa_log_log(l,SPA_LOG_LEVEL_INFO,__FILE__,__LINE__,__func__,__VA_ARGS__) 139 #define spa_log_debug(l,...) spa_log_log(l,SPA_LOG_LEVEL_DEBUG,__FILE__,__LINE__,__func__,__VA_ARGS__) 140 #define spa_log_trace(l,...) spa_log_log(l,SPA_LOG_LEVEL_TRACE,__FILE__,__LINE__,__func__,__VA_ARGS__) 143 #define spa_log_trace_fp(l,...) spa_log_log(l,SPA_LOG_LEVEL_TRACE,__FILE__,__LINE__,__func__,__VA_ARGS__) 145 #define spa_log_trace_fp(l,...) 150 #define SPA_LOG_FUNC(name,lev) \ 151 inline SPA_PRINTF_FUNC(2,3) void spa_log_##name (struct spa_log *l, const char *format, ...) \ 153 if (SPA_UNLIKELY(spa_log_level_enabled(l, lev))) { \ 155 va_start (varargs, format); \ 156 spa_interface_call(&l->iface, \ 157 struct spa_log_methods, logv, 0, lev, \ 158 __FILE__,__LINE__,__func__,format,varargs); \ 180 #define SPA_KEY_LOG_LEVEL "log.level" 181 #define SPA_KEY_LOG_COLORS "log.colors" 182 #define SPA_KEY_LOG_FILE "log.file" 184 #define SPA_KEY_LOG_TIMESTAMP "log.timestamp" 185 #define SPA_KEY_LOG_LINE "log.line" Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:51
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:48
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:52
spa_log_level
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:46
struct spa_interface iface
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:65
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:47
uint32_t version
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:74
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:61
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:205
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:50
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:72
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:49
#define spa_log_trace_fp(l,...)
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:143
enum spa_log_level level
Logging level, everything above this level is not logged.
Definition: obj-x86_64-linux-gnu/doc/spa/support/log.h:69