From b3cdee66a98eef61fa6abf4e9cf3caefcf76bed2 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 16 Jul 2022 22:45:41 +0200 Subject: [PATCH] update documentation to reflect DEBUG_LOG for release builds --- CONTRIBUTING.md | 5 ++--- doc/090_participating.rst | 31 ++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 02b6fa5a5..cf1f1e739 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,9 +48,8 @@ environment was used and so on. Please tell us at least the following things: Remember, the easier it is for us to reproduce the bug, the earlier it will be corrected! -In addition, you can compile restic with debug support by running -`go run build.go -tags debug` and instructing it to create a debug -log by setting the environment variable `DEBUG_LOG` to a file, e.g. like this: +In addition, you can instruct restic to create a debug log by setting the +environment variable `DEBUG_LOG` to a file, e.g. like this: $ export DEBUG_LOG=/tmp/restic-debug.log $ restic backup ~/work diff --git a/doc/090_participating.rst b/doc/090_participating.rst index 7c7e0e72b..00a387974 100644 --- a/doc/090_participating.rst +++ b/doc/090_participating.rst @@ -14,18 +14,12 @@ Participating ############# -********* -Debugging -********* +********** +Debug Logs +********** -The program can be built with debug support like this: - -.. code-block:: console - - $ go run build.go -tags debug - -Afterwards, extensive debug messages are written to the file in -environment variable ``DEBUG_LOG``, e.g.: +Set the environment variable ``DEBUG_LOG`` to let restic write extensive debug +messages to the specified filed, e.g.: .. code-block:: console @@ -66,6 +60,21 @@ statements originating in functions that match the pattern ``*unlock*`` $ DEBUG_FUNCS=*unlock* restic check +********* +Debugging +********* + +The program can be built with debug support like this: + +.. code-block:: console + + $ go run build.go -tags debug + +This will make the ``restic debug `` available which can be used to +inspect internal data structures. In addition, this enables profiling support +which can help with investigation performance and memory usage issues. + + ************ Contributing ************