mirror of
https://github.com/rclone/rclone.git
synced 2025-02-11 08:00:33 +01:00
log: fix --use-json-log going to stderr not --log-file on Windows - fixes #4367
This commit is contained in:
parent
d745bc1baa
commit
687865f760
@ -10,6 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/rclone/rclone/fs"
|
"github.com/rclone/rclone/fs"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Options contains options for the remote control server
|
// 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)
|
fs.Errorf(nil, "Failed to seek log file to end: %v", err)
|
||||||
}
|
}
|
||||||
log.SetOutput(f)
|
log.SetOutput(f)
|
||||||
|
logrus.SetOutput(f)
|
||||||
redirectStderr(f)
|
redirectStderr(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user