57 #define SPA_TYPE_INTERFACE_Log SPA_TYPE_INFO_INTERFACE_BASE "Log" 59 #define SPA_VERSION_LOG 0 72 #define SPA_VERSION_LOG_METHODS 0 85 void (*
log) (
void *object,
112 #define spa_log_level_enabled(l,lev) ((l) && (l)->level >= (lev)) 114 #if defined(__USE_ISOC11) || defined(__USE_ISOC99) || \ 115 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) 117 #define spa_log_log(l,lev,...) \ 119 struct spa_log *_l = l; \ 120 if (SPA_UNLIKELY(spa_log_level_enabled(_l, lev))) \ 121 spa_interface_call(&_l->iface, \ 122 struct spa_log_methods, log, 0, lev, \ 126 #define spa_log_logv(l,lev,...) \ 128 struct spa_log *_l = l; \ 129 if (SPA_UNLIKELY(spa_log_level_enabled(_l, lev))) \ 130 spa_interface_call(&_l->iface, \ 131 struct spa_log_methods, logv, 0, lev, \ 135 #define spa_log_error(l,...) spa_log_log(l,SPA_LOG_LEVEL_ERROR,__FILE__,__LINE__,__func__,__VA_ARGS__) 136 #define spa_log_warn(l,...) spa_log_log(l,SPA_LOG_LEVEL_WARN,__FILE__,__LINE__,__func__,__VA_ARGS__) 137 #define spa_log_info(l,...) spa_log_log(l,SPA_LOG_LEVEL_INFO,__FILE__,__LINE__,__func__,__VA_ARGS__) 138 #define spa_log_debug(l,...) spa_log_log(l,SPA_LOG_LEVEL_DEBUG,__FILE__,__LINE__,__func__,__VA_ARGS__) 139 #define spa_log_trace(l,...) spa_log_log(l,SPA_LOG_LEVEL_TRACE,__FILE__,__LINE__,__func__,__VA_ARGS__) 142 #define spa_log_trace_fp(l,...) spa_log_log(l,SPA_LOG_LEVEL_TRACE,__FILE__,__LINE__,__func__,__VA_ARGS__) 144 #define spa_log_trace_fp(l,...) 149 #define SPA_LOG_FUNC(name,lev) \ 150 inline SPA_PRINTF_FUNC(2,3) void spa_log_##name (struct spa_log *l, const char *format, ...) \ 152 if (SPA_UNLIKELY(spa_log_level_enabled(l, lev))) { \ 154 va_start (varargs, format); \ 155 spa_interface_call(&l->iface, \ 156 struct spa_log_methods, logv, 0, lev, \ 157 __FILE__,__LINE__,__func__,format,varargs); \ 171 inline void spa_log_trace_fp (
struct spa_log *l,
const char *format, ...) { }
177 #define SPA_KEY_LOG_LEVEL "log.level" 178 #define SPA_KEY_LOG_COLORS "log.colors" 179 #define SPA_KEY_LOG_FILE "log.file" 181 #define SPA_KEY_LOG_TIMESTAMP "log.timestamp" 182 #define SPA_KEY_LOG_LINE "log.line" Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:50
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:47
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:51
spa_log_level
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:45
struct spa_interface iface
the version of this log.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:64
void(*) void(* logv)(void *object, enum spa_log_level level, const char *file, int line, const char *func, const char *fmt, va_list args) SPA_PRINTF_FUNC(6
Log a message with the given log level.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:103
void(* log)(void *object, enum spa_log_level level, const char *file, int line, const char *func, const char *fmt,...) SPA_PRINTF_FUNC(6
Log a message with the given log level.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:85
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:46
uint32_t version
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:73
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:61
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:203
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:49
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:71
enum spa_log_level level const char int const char const char * fmt
Definition: log-impl.h:43
enum spa_log_level level const char int line
Definition: log-impl.h:43
#define SPA_LOG_FUNC(name, lev)
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:149
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:48
enum spa_log_level level const char * file
Definition: log-impl.h:43
static uint32_t int int const char va_list args
Definition: core.h:330
enum spa_log_level level const char int const char * func
Definition: log-impl.h:43
enum spa_log_level level
Logging level, everything above this level is not logged.
Definition: x86_64-redhat-linux-gnu/doc/spa/support/log.h:68