mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pw_log_log/logv now go through the topic-based logger using the
"default" topic. Log topics themselves can be allocated by the call
sites. The simplest way to use a topic from e.g. a module:
PW_LOG_TOPIC_STATIC(mod_topic, "mod.foo");
#define PW_LOG_TOPIC_DEFAULT mod_topic
...
void pipewire__module_init() {
PW_LOG_TOPIC_INIT(mod_topic);
...
}
With the #define all pw_log_foo() are now routed through the custom
topic. For the cases where the log topic must be specified, a
pw_logt_foo() set of macros is available.
Log topics are enabled through the PIPEWIRE_DEBUG environment variable
which now supports globs, e.g. PIPEWIRE_DEBUG="*:I;mod.access:D"
to enable global INFO but DEBUG for the access module.
Namespaces documented are "pw", "mod" and "conn", for pipewire-internal
stuff, modules and connection dumping. The latter is special-cased to
avoid spamming the log files, it requires an expcit "conn.<glob>"
pattern to enable.
The "default" topic always exists and is the fallback for any
pw_log_foo() invocation that does not use a topic.
|
||
|---|---|---|
| .. | ||
| meson.build | ||
| pwtest-compat.c | ||
| pwtest-implementation.h | ||
| pwtest.c | ||
| pwtest.h | ||
| test-array.c | ||
| test-client.c | ||
| test-config.c | ||
| test-context.c | ||
| test-example.c | ||
| test-lib.c | ||
| test-logger.c | ||
| test-properties.c | ||
| test-pwtest.c | ||
| test-spa-buffer.c | ||
| test-spa-json.c | ||
| test-spa-log.c | ||
| test-spa-node.c | ||
| test-spa-pod.c | ||
| test-spa-utils.c | ||
| test-support.c | ||
| test-utils.c | ||