Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Nick Craig-Wood99c293a4031c
diff --git a/fs/log/log.go b/fs/log/log.go
index 3dbea6993..48c0bd45a 100644
--- a/fs/log/log.go
+++ b/fs/log/log.go
@@ -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)
}