Introduce debug tags and debug breaks

The environment variable DEBUG_TAGS can be used to control what is
printed on stderr. Example:

    DEBUG_TAGS="+all,-Archiver.*" ./restic backup foo

The variable DEBUG_BREAK can be used to set a breakpoint (implemented
using SIGSTOP):

    DEBUG_BREAK=Archiver.Snapshot ./restic backup foo
This commit is contained in:
Alexander Neumann
2015-01-11 14:09:44 +01:00
parent 203a911de9
commit 48751e1935
5 changed files with 134 additions and 32 deletions

View File

@@ -2,4 +2,6 @@
package restic
func debug(fmt string, args ...interface{}) {}
func debug(tag string, fmt string, args ...interface{}) {}
func debug_break(string) {}