From 773fee315ae29c8da5ab1c7bd6ccf093f3db1a4f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Tue, 9 Jul 2024 08:58:37 +0300 Subject: [PATCH] docs: add info on how to set the log level via configuration --- docs/rst/daemon/logging.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/rst/daemon/logging.rst b/docs/rst/daemon/logging.rst index 6717c2f1..ccba6138 100644 --- a/docs/rst/daemon/logging.rst +++ b/docs/rst/daemon/logging.rst @@ -127,6 +127,42 @@ Above, ```` should be replaced by the WirePlumber daemon client ID. Note that PipeWire daemon log levels must be specified by numbers, not letter codes. +Changing log level via static configuration +------------------------------------------- + +If you need to capture logs from WirePlumber at startup or in other circumstances +where changing the level at runtime or setting an environment variable is not +feasible, then you may also set the log level in the configuration file. + +The log level changes via the ``log.level`` key in the ``context.properties`` +section: + +.. code:: + + context.properties = { + log.level = "D" + } + +You may use the same syntax as in ``WIREPLUMBER_DEBUG`` to describe the exact +logging you want to achieve. For instance, to log debug messages from all +scripts and informational messages from everywhere else: + +.. code:: + + context.properties = { + log.level = "I,s-*:D" + } + +The easiest way to configure this is to drop a +:ref:`fragment file ` that contains just this. + +.. code-block:: bash + + $ mkdir -p ~/.config/wireplumber/wireplumber.conf.d + $ echo 'context.properties = { log.level = "D" }' > ~/.config/wireplumber/wireplumber.conf.d/log.conf + +See also :ref:`config_modifying_configuration` + Examples --------