From 968b2ece43fd3b14599fef2912bbabafc8ccb7c0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 28 Sep 2016 20:22:22 +0200 Subject: [PATCH] Add section to the manual about debug message filters --- doc/Manual.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/Manual.md b/doc/Manual.md index 547f635be..1b663feec 100644 --- a/doc/Manual.md +++ b/doc/Manual.md @@ -544,6 +544,28 @@ If you suspect that there is a bug, you can have a look at the debug log. Please be aware that the debug log might contain sensitive information such as file and directory names. +The debug log will always contain all log messages restic generates. You can +also instruct restic to print some or all debug messages to stderr. These can +also be limited to e.g. a list of source files or a list of patterns for +function names. The patterns are globbing patterns (see the documentation for +[`path.Glob`](https://golang.org/pkg/path/#Glob)), multiple patterns are +separated by commas. Patterns are case sensitive. + +Printing all log messages to the console can be achieved by setting the file +filter to `*`: + + $ DEBUG_FILES=* restic check + +If you want restic to just print all debug log messages from the files +`main.go` and `lock.go`, set the environment variable `DEBUG_FILES` like this: + + $ DEBUG_FILES=main.go,lock.go restic check + +The following command line instructs restic to only print debug statements +originating in functions that match the pattern `*unlock*` (case sensitive): + + $ DEBUG_FUNCS=*unlock* restic check + # Under the hood: Browse repository objects Internally, a repository stores data of several different types described in the [design documentation](https://github.com/restic/restic/blob/master/doc/Design.md). You can `list` objects such as blobs, packs, index, snapshots, keys or locks with the following command: