From 00719616cadd3c8699a8f5b623bbfbcf8e50a663 Mon Sep 17 00:00:00 2001 From: Sebastian Mohr Date: Wed, 24 Jun 2026 18:56:40 +0200 Subject: [PATCH] Added proposal for logging modes to docs. This is intended for review and decision making at the moment. --- docs/reference/index.rst | 1 + docs/reference/logging.rst | 181 +++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 docs/reference/logging.rst diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 1f04366597..edb7856245 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -12,3 +12,4 @@ started with beets as a new user, though, you may want to read the config pathformat query + logging diff --git a/docs/reference/logging.rst b/docs/reference/logging.rst new file mode 100644 index 0000000000..9902a114c3 --- /dev/null +++ b/docs/reference/logging.rst @@ -0,0 +1,181 @@ +Logging +======= + +Beets implements a flexible logging solution and ships multiple built-in modes. +You can select a mode from the command line for quick control, or define and +customize modes in the configuration file for more advanced setups. + +Use the ``--logging `` option to select a logging mode for a single +invocation of any beets command. For example, to run the import command in debug +mode, you could do: + +.. code-block:: console + + beets --logging debug import music/ + +.. note:: + + The command-line option overrides any logging mode configured in the + configuration file. + +If you want to persist a logging mode across multiple invocations of beets, you +can define a mode in the configuration file. For example, to set the default +logging mode to ``debug``, you could add the following to your configuration +file: + +.. code-block:: yaml + :caption: config.yaml + + logging: debug + +.. note:: + + Invalid logging modes will be ignored, and beets will fall back to the + default mode. + +Built-in modes +-------------- + +Beets ships with several built-in logging modes. The following table summarizes +the available modes and their characteristics: + +.. conf:: legacy + + Replicates the logging behavior of beets versions prior to 3.0. Messages are emitted + as plain text with minimal formatting. + + + .. code-block:: console + + : + TODO Add a real output + +.. conf:: verbose + + The default logging mode for ``beets>=v3.0.0``. + + This mode explains what beets is doing in a more explicit way than + ``legacy``, including key decisions such as matching, tagging, and + file operations, without exposing full internal debug information. + + .. code-block:: console + + [] : + TODO Add a real output + + + It provides more insight into what beets is doing while keeping output concise + enough for everyday use. + +.. conf:: quiet + + Suppresses informational output and only displays warnings and errors. + + Useful for scripts or automated workflows where only warnings and errors should be + displayed. + + .. code-block:: console + + [] : + TODO Add a real output + +.. conf:: debug + + Enables verbose diagnostic logging for both core functionality and plugins. + + This mode includes timestamps, log levels, and logger names, making it + useful for debugging and development. + + .. code-block:: console + +