Skip to content

Draft: spa: add spa_log_topic_register/unregister + spa_log_configure

P V requested to merge pvir/pipewire:dyn-log-topic-other into master

Support changing log levels at runtime also for log topics.

Support the PIPEWIRE_DEBUG syntax also in log.level of context properties and metadata.


Add functions for declaring spa_log_topic struct lifetime to the logger. The logger can then update the log levels of each topics also at runtime if these log levels are changed.

Add function to indicate to the logger that the logging configuration was changed. Don't try to specify the configuration format in the interface, except for plain global log level changes. The host knows which logger plugin it is using.

Add spa_log_methods.topic_register and spa_log_methods.configure and bump methods to V2.

The design looks like this because:

  • Log topic lifetime may be either shorter or longer than the logger.

  • Same log topic may be registered multiple times, either to same logger or to different ones.

  • pw_log_set may change the underlying spa_log at any time.

  • Threadsafety (without locks)


Plus the big search-and-replace commits to use the register/unregister.

Edited by P V

Merge request reports

Loading