mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
GODT-1816: Allow debug logs to written to disk
This commit is contained in:
committed by
James Houlahan
parent
f01c70e506
commit
0f81286ff5
@ -97,7 +97,7 @@ func setLevel(level string) error {
|
|||||||
|
|
||||||
// The hook to print panic, fatal and error to stderr is always
|
// The hook to print panic, fatal and error to stderr is always
|
||||||
// added. We want to avoid log duplicates by replacing all hooks.
|
// 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.StandardLogger().ReplaceHooks(logrus.LevelHooks{})
|
||||||
logrus.SetOutput(os.Stderr)
|
logrus.SetOutput(os.Stderr)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user