mirror of
https://github.com/restic/restic.git
synced 2026-05-23 10:35:23 +00:00
debug: init debug logger before init() methods run
This commit is contained in:
+7
-1
@@ -20,12 +20,18 @@ var opts struct {
|
||||
m sync.Mutex
|
||||
}
|
||||
|
||||
func init() {
|
||||
// make sure that all the initialization happens before the init() functions
|
||||
// are called, cf https://golang.org/ref/spec#Package_initialization
|
||||
var _ = initDebug()
|
||||
|
||||
func initDebug() bool {
|
||||
initDebugLogger()
|
||||
initDebugTags()
|
||||
initDebugBreaks()
|
||||
|
||||
fmt.Fprintf(os.Stderr, "debug enabled\n")
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func initDebugLogger() {
|
||||
|
||||
Reference in New Issue
Block a user