|
| #define | PW_LOG_TOPIC_STATIC(var, topic) |
| | Declare a static log topic named var.
|
| |
| #define | PW_LOG_TOPIC_EXTERN(var) |
| | Declare a static log topic named var.
|
| |
| #define | PW_LOG_TOPIC(var, topic) |
| | Declare a static log topic named var.
|
| |
| #define | PW_LOG_TOPIC_INIT(var) |
| |
| #define | pw_log_level_enabled(lev) |
| | Check if a loglevel is enabled.
|
| |
| #define | pw_log_topic_enabled(lev, t) |
| |
| #define | pw_logtv(lev, topic, fmt, ap) |
| |
| #define | pw_logt(lev, topic, ...) |
| |
| #define | pw_log(lev, ...) |
| |
| #define | pw_log_error(...) |
| |
| #define | pw_log_warn(...) |
| |
| #define | pw_log_info(...) |
| |
| #define | pw_log_debug(...) |
| |
| #define | pw_log_trace(...) |
| |
| #define | pw_logt_error(t, ...) |
| |
| #define | pw_logt_warn(t, ...) |
| |
| #define | pw_logt_info(t, ...) |
| |
| #define | pw_logt_debug(t, ...) |
| |
| #define | pw_logt_trace(t, ...) |
| |
| #define | pw_log_trace_fp(...) |
| |
|
| void | pw_log_set (struct spa_log *log) |
| | Configure a logging module.
|
| |
| struct spa_log * | pw_log_get (void) |
| | Get the log interface.
|
| |
| void | pw_log_set_level (enum spa_log_level level) |
| | Configure the logging level.
|
| |
| 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 | 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 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 | 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.
|
| |
| void void void void void | _pw_log_topic_new (struct spa_log_topic *topic) |
| | Initialize the log topic.
|
| |
Logging functions of PipeWire
Logging is performed to stdout and stderr. Trace logging is performed in a lockfree ringbuffer and written out from the main thread as to not block the realtime threads.
◆ PW_LOG_TOPIC_STATIC
| #define PW_LOG_TOPIC_STATIC |
( |
| var, |
|
|
| topic ) |
Declare a static log topic named var.
The usual usage is:
#define PW_LOG_TOPIC_DEFAULT my_topic
void foo() {
}
#define PW_LOG_TOPIC_STATIC(var, topic)
Declare a static log topic named var.
Definition log.h:122
#define pw_log_debug(...)
Definition log.h:165
◆ PW_LOG_TOPIC_EXTERN
| #define PW_LOG_TOPIC_EXTERN |
( |
| var | ) |
|
Value:
Identifier for a topic.
Definition log.h:103
Declare a static log topic named var.
See PW_LOG_TOPIC_STATIC for an example usage.
◆ PW_LOG_TOPIC
| #define PW_LOG_TOPIC |
( |
| var, |
|
|
| topic ) |
◆ PW_LOG_TOPIC_INIT
| #define PW_LOG_TOPIC_INIT |
( |
| var | ) |
|
Value:
struct spa_log * pw_log_get(void)
Get the log interface.
Definition log.c:98
#define spa_log_topic_init(l, topic)
Definition log.h:228
◆ pw_log_level_enabled
| #define pw_log_level_enabled |
( |
| lev | ) |
|
Value:
enum spa_log_level pw_log_level
The global log level.
Definition log.c:43
Check if a loglevel is enabled.
◆ pw_log_topic_enabled
| #define pw_log_topic_enabled |
( |
| lev, |
|
|
| t ) |
Value:
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition log.h:145
◆ pw_logtv
| #define pw_logtv |
( |
| lev, |
|
|
| topic, |
|
|
| fmt, |
|
|
| ap ) |
◆ pw_logt
| #define pw_logt |
( |
| lev, |
|
|
| topic, |
|
|
| ... ) |
◆ pw_log
| #define pw_log |
( |
| lev, |
|
|
| ... ) |
Value:
struct spa_log_topic * PW_LOG_TOPIC_DEFAULT
Definition log.c:48
#define pw_logt(lev, topic,...)
Definition log.h:154
◆ pw_log_error
| #define pw_log_error |
( |
| ... | ) |
|
◆ pw_log_warn
| #define pw_log_warn |
( |
| ... | ) |
|
Value:
@ SPA_LOG_LEVEL_WARN
Definition log.h:68
- Examples
- audio-src.c, bluez-session.c, tutorial4.c, tutorial5.c, video-dsp-play.c, video-play-fixate.c, video-play-pull.c, video-play-reneg.c, video-play.c, video-src-alloc.c, video-src-fixate.c, video-src-reneg.c, and video-src.c.
◆ pw_log_info
| #define pw_log_info |
( |
| ... | ) |
|
◆ pw_log_debug
| #define pw_log_debug |
( |
| ... | ) |
|
◆ pw_log_trace
| #define pw_log_trace |
( |
| ... | ) |
|
◆ pw_logt_error
| #define pw_logt_error |
( |
| t, |
|
|
| ... ) |
◆ pw_logt_warn
| #define pw_logt_warn |
( |
| t, |
|
|
| ... ) |
◆ pw_logt_info
| #define pw_logt_info |
( |
| t, |
|
|
| ... ) |
◆ pw_logt_debug
| #define pw_logt_debug |
( |
| t, |
|
|
| ... ) |
◆ pw_logt_trace
| #define pw_logt_trace |
( |
| t, |
|
|
| ... ) |
◆ pw_log_trace_fp
| #define pw_log_trace_fp |
( |
| ... | ) |
|
◆ pw_log_set()
| void pw_log_set |
( |
struct spa_log * | log | ) |
|
Configure a logging module.
This is usually done automatically in pw_init() but you can install a custom logger before calling pw_init().
Configure a logging module.
- Parameters
-
◆ pw_log_get()
| struct spa_log * pw_log_get |
( |
void | | ) |
|
Get the log interface.
Get the log interface.
- Returns
- the global log
◆ pw_log_set_level()
Configure the logging level.
Configure the logging level.
- Parameters
-
◆ pw_log_logt()
| 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, |
|
|
| ... ) |
Log a message for a topic.
◆ pw_log_logtv()
| 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 ) |
Log a message for a topic.
◆ pw_log_log()
| void void void pw_log_log |
( |
enum spa_log_level | level, |
|
|
const char * | file, |
|
|
int | line, |
|
|
const char * | func, |
|
|
const char * | fmt, |
|
|
| ... ) |
Log a message for the default topic.
◆ pw_log_logv()
| 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 ) |
Log a message for the default topic.
◆ _pw_log_topic_new()
| void void void void void _pw_log_topic_new |
( |
struct spa_log_topic * | topic | ) |
|
Initialize the log topic.
The returned topic is owned by the pipewire context and the topic must not be modified or freed. Do not use this function directly, use one of PW_LOG_TOPIC_* instead.
- See also
- PW_LOG_TOPIC_STATIC
-
PW_LOG_TOPIC_EXTERN
-
PW_LOG_TOPIC
◆ pw_log_level
◆ PW_LOG_TOPIC_DEFAULT