From 2e3d4640be77165325d81efbf5dd4a031d90b8d1 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 10 Dec 2022 16:08:27 +0100 Subject: [PATCH] Don't buffer the golang log output when running tests --- cmd/restic/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/restic/main.go b/cmd/restic/main.go index 2582a3781..cfef7c885 100644 --- a/cmd/restic/main.go +++ b/cmd/restic/main.go @@ -85,13 +85,11 @@ func needsPassword(cmd string) bool { var logBuffer = bytes.NewBuffer(nil) -func init() { +func main() { // install custom global logger into a buffer, if an error occurs // we can show the logs log.SetOutput(logBuffer) -} -func main() { debug.Log("main %#v", os.Args) debug.Log("restic %s compiled with %v on %v/%v", version, runtime.Version(), runtime.GOOS, runtime.GOARCH)