GODT-1816: Allow debug logs to written to disk

This commit is contained in:
Leander Beernaert
2022-10-11 16:09:01 +02:00
committed by James Houlahan
parent f01c70e506
commit 0f81286ff5

View File

@ -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)
}