update documentation to reflect DEBUG_LOG for release builds

This commit is contained in:
Michael Eischer 2022-07-16 22:45:41 +02:00
parent 1ed775e3a8
commit b3cdee66a9
2 changed files with 22 additions and 14 deletions

View file

@ -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 Remember, the easier it is for us to reproduce the bug, the earlier it will be
corrected! corrected!
In addition, you can compile restic with debug support by running In addition, you can instruct restic to create a debug log by setting the
`go run build.go -tags debug` and instructing it to create a debug environment variable `DEBUG_LOG` to a file, e.g. like this:
log by setting the environment variable `DEBUG_LOG` to a file, e.g. like this:
$ export DEBUG_LOG=/tmp/restic-debug.log $ export DEBUG_LOG=/tmp/restic-debug.log
$ restic backup ~/work $ restic backup ~/work

View file

@ -14,18 +14,12 @@
Participating Participating
############# #############
********* **********
Debugging Debug Logs
********* **********
The program can be built with debug support like this: Set the environment variable ``DEBUG_LOG`` to let restic write extensive debug
messages to the specified filed, e.g.:
.. 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.:
.. code-block:: console .. code-block:: console
@ -66,6 +60,21 @@ statements originating in functions that match the pattern ``*unlock*``
$ DEBUG_FUNCS=*unlock* restic check $ 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 <subcommand>`` 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 Contributing
************ ************