1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

log: fix --use-json-log going to stderr not --log-file on Windows - fixes #4367

This commit is contained in:
Nick Craig-Wood
2020-06-26 13:05:56 +01:00
parent d745bc1baa
commit 687865f760

View File

@@ -10,6 +10,7 @@ import (
"strings"
"github.com/rclone/rclone/fs"
"github.com/sirupsen/logrus"
)
// Options contains options for the remote control server
@@ -120,6 +121,7 @@ func InitLogging() {
fs.Errorf(nil, "Failed to seek log file to end: %v", err)
}
log.SetOutput(f)
logrus.SetOutput(f)
redirectStderr(f)
}