log: fix --use-json-log going to stderr not --log-file on Windows - fixes #4367
This commit is contained in:
parent
fefcbf60fa
commit
99c293a403
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue