48 int line,
const char *func,
56 int line, const
char *func,
65 int line, const
char *func,
72 int line, const
char *func,
97 #define PW_LOG_TOPIC_STATIC(var, topic) \
98 static struct spa_log_topic var##__LINE__ = SPA_LOG_TOPIC(0, topic); \
99 static struct spa_log_topic *(var) = &(var##__LINE__)
105 #define PW_LOG_TOPIC_EXTERN(var) \
106 extern struct spa_log_topic *var
112 #define PW_LOG_TOPIC(var, topic) \
113 struct spa_log_topic var##__LINE__ = SPA_LOG_TOPIC(0, topic); \
114 struct spa_log_topic *(var) = &(var##__LINE__)
116 #define PW_LOG_TOPIC_INIT(var) \
117 spa_log_topic_init(pw_log_get(), var);
120 #define pw_log_level_enabled(lev) (pw_log_level >= (lev))
121 #define pw_log_topic_enabled(lev,t) ((t) && (t)->has_custom_level ? (t)->level >= (lev) : pw_log_level_enabled((lev)))
123 #define pw_logtv(lev,topic,fmt,ap) \
125 if (SPA_UNLIKELY(pw_log_topic_enabled(lev,topic))) \
126 pw_log_logtv(lev,topic,__FILE__,__LINE__,__func__,fmt,ap); \
129 #define pw_logt(lev,topic,...) \
131 if (SPA_UNLIKELY(pw_log_topic_enabled(lev,topic))) \
132 pw_log_logt(lev,topic,__FILE__,__LINE__,__func__,__VA_ARGS__); \
135 #define pw_log(lev,...) pw_logt(lev,PW_LOG_TOPIC_DEFAULT,__VA_ARGS__)
137 #define pw_log_error(...) pw_log(SPA_LOG_LEVEL_ERROR,__VA_ARGS__)
138 #define pw_log_warn(...) pw_log(SPA_LOG_LEVEL_WARN,__VA_ARGS__)
139 #define pw_log_info(...) pw_log(SPA_LOG_LEVEL_INFO,__VA_ARGS__)
140 #define pw_log_debug(...) pw_log(SPA_LOG_LEVEL_DEBUG,__VA_ARGS__)
141 #define pw_log_trace(...) pw_log(SPA_LOG_LEVEL_TRACE,__VA_ARGS__)
143 #define pw_logt_error(t,...) pw_logt(SPA_LOG_LEVEL_ERROR,t,__VA_ARGS__)
144 #define pw_logt_warn(t,...) pw_logt(SPA_LOG_LEVEL_WARN,t,__VA_ARGS__)
145 #define pw_logt_info(t,...) pw_logt(SPA_LOG_LEVEL_INFO,t,__VA_ARGS__)
146 #define pw_logt_debug(t,...) pw_logt(SPA_LOG_LEVEL_DEBUG,t,__VA_ARGS__)
147 #define pw_logt_trace(t,...) pw_logt(SPA_LOG_LEVEL_TRACE,t,__VA_ARGS__)
150 #define pw_log_trace_fp(...) pw_log(SPA_LOG_LEVEL_TRACE,__VA_ARGS__)
152 #define pw_log_trace_fp(...)
void void pw_log_logtv(enum spa_log_level level, const struct spa_log_topic *topic, const char *file, int line, const char *func, const char *fmt, va_list args) 1(6
Log a message for a topic.
void pw_log_set(struct spa_log *log)
Configure a logging module.
Definition: log.c:64
void void void void pw_log_logv(enum spa_log_level level, const char *file, int line, const char *func, const char *fmt, va_list args) 1(5
Log a message for the default topic.
struct spa_log * pw_log_get(void)
Get the log interface.
Definition: log.c:79
void pw_log_set_level(enum spa_log_level level)
Configure the logging level.
Definition: log.c:88
struct spa_log_topic * PW_LOG_TOPIC_DEFAULT
Definition: log.c:29
enum spa_log_level pw_log_level
The global log level.
Definition: log.c:24
void pw_log_logt(enum spa_log_level level, const struct spa_log_topic *topic, const char *file, int line, const char *func, const char *fmt,...) 1(6
Log a message for a topic.
void void void pw_log_log(enum spa_log_level level, const char *file, int line, const char *func, const char *fmt,...) 1(5
Log a message for the default topic.
void void void void void _pw_log_topic_new(struct spa_log_topic *topic)
Initialize the log topic.
Definition: log.c:238
spa_log_level
Definition: spa/include/spa/support/log.h:45
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:273
Identifier for a topic.
Definition: spa/include/spa/support/log.h:83
Definition: spa/include/spa/support/log.h:61
enum spa_log_level level
Logging level, everything above this level is not logged.
Definition: spa/include/spa/support/log.h:70