From 0f81286ff56b78ed3b5258b863f68c12c970abf7 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 11 Oct 2022 16:09:01 +0200 Subject: [PATCH] GODT-1816: Allow debug logs to written to disk --- internal/logging/logging.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/logging/logging.go b/internal/logging/logging.go index e5e0a501..44bd749a 100644 --- a/internal/logging/logging.go +++ b/internal/logging/logging.go @@ -97,7 +97,7 @@ func setLevel(level string) error { // The hook to print panic, fatal and error to stderr is always // added. We want to avoid log duplicates by replacing all hooks. - if logrus.GetLevel() == logrus.DebugLevel || logrus.GetLevel() == logrus.TraceLevel { + if logrus.GetLevel() == logrus.TraceLevel { _ = logrus.StandardLogger().ReplaceHooks(logrus.LevelHooks{}) logrus.SetOutput(os.Stderr) }