1
mirror of https://github.com/rclone/rclone synced 2024-09-06 00:08:57 +02: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 fefcbf60fa
commit 99c293a403

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