diff --git a/fs/config.go b/fs/config.go index 3a4de7717..5a4e44c71 100644 --- a/fs/config.go +++ b/fs/config.go @@ -4,6 +4,7 @@ import ( "context" "net" "os" + "strconv" "strings" "time" @@ -179,6 +180,11 @@ func NewConfig() *ConfigInfo { if arg == "--log-level=DEBUG" || (arg == "--log-level" && len(os.Args) > argIndex+1 && os.Args[argIndex+1] == "DEBUG") { c.LogLevel = LogLevelDebug } + if strings.HasPrefix(arg, "--verbose=") { + if level, err := strconv.Atoi(arg[10:]); err == nil && level >= 2 { + c.LogLevel = LogLevelDebug + } + } } envValue, found := os.LookupEnv("RCLONE_LOG_LEVEL") if found && envValue == "DEBUG" {