pipewire/test
Peter Hutterer 52bd80aaa4 log: add topic loggers and a default topic
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.
2021-09-28 09:35:38 +02:00
..
meson.build spa: add topic-based logging 2021-09-28 09:35:38 +02:00
pwtest-compat.c test: add sigabbrev_np() for systems where it's not available 2021-06-10 15:13:57 +10:00
pwtest-implementation.h test: add errno check macros 2021-06-09 18:00:06 +10:00
pwtest.c test: fix the environment variable name to disable systemd logging 2021-09-24 12:33:15 +10:00
pwtest.h spa: implement the new topic logging for the provided loggers 2021-09-28 09:35:38 +02:00
test-array.c meson.build: drop HAVE_CONFIG_H 2021-06-10 09:04:16 +10:00
test-client.c test: move the client and utils tests over here 2021-08-04 07:45:06 +00:00
test-config.c test: fix a memleak in the config tests 2021-07-07 11:03:23 +00:00
test-context.c test: remove duplicate test invocation 2021-07-06 07:14:21 +00:00
test-example.c meson.build: drop HAVE_CONFIG_H 2021-06-10 09:04:16 +10:00
test-lib.c meson.build: drop HAVE_CONFIG_H 2021-06-10 09:04:16 +10:00
test-logger.c log: add topic loggers and a default topic 2021-09-28 09:35:38 +02:00
test-properties.c test: move some of the property tests to pwtest 2021-06-17 07:08:53 +00:00
test-pwtest.c test: add sigabbrev_np() for systems where it's not available 2021-06-10 15:13:57 +10:00
test-spa-buffer.c test: convert two spa tests to pwtest 2021-06-09 18:00:39 +10:00
test-spa-json.c test: convert two spa tests to pwtest 2021-06-09 18:00:39 +10:00
test-spa-log.c spa: add topic-based logging 2021-09-28 09:35:38 +02:00
test-spa-node.c test: replace all spa_assert() macros with spa_assert_se() 2021-07-27 10:24:44 +10:00
test-spa-pod.c test: replace all spa_assert() macros with spa_assert_se() 2021-07-27 10:24:44 +10:00
test-spa-utils.c spa: add a macro to check for a callback version 2021-09-28 09:35:38 +02:00
test-support.c test: add a test for the logger truncation 2021-06-09 18:00:39 +10:00
test-utils.c test: move the client and utils tests over here 2021-08-04 07:45:06 +00:00