--log-file seems incompatible with verbosity flags

What is the problem you are having with rclone?

Commands that include both –log-file=<path> and --verbose or -v or -vv fail without an error message.

But, ah: one version of a command - not the one I list below - included the following in its output: ‘CRITICAL: Can't set -v and --log-level’. But: (1) does the documentation say that somewhere? (2) How come the command that I do list below does not give that output?

Run the command 'rclone version' and share the full output of the command.

rclone v1.72.0

  • os/version: linuxmint 22.2 (64 bit)
  • os/kernel: 6.14.0-36-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.25.4
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

b2

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync. Specifically:

rclone sync --b2-chunk-size=96Mi --b2-hard-delete --backup-dir=<redacted> --bwlimit=5M:10M --checkers=8 --fast-list --filter-from=/home/<redacted>/rclone/lists/dots_filter-from --max-depth=7 --min-size=1B --max-size=20M --local-no-check-updated --log-file /tmp/rclone_test_bTL --log-level=ERROR --one-file-system --retries=6 --skip-links --stats=0 --stats-one-line --timeout=2m --tpslimit=0 --tpslimit-burst=1 --transfers=4 -vv /home/<redacted> enc-b2:/<redacted>
[b2]
type = b2
account = XXX
key = XXX
hard_delete = true

[box]
type = box
token = XXX

[enc-b2]
type = crypt
remote = b2:x1-everything
filename_encryption = standard
password = XXX
password2 = XXX

A log from the command that you were trying to run with the -vv flag

Inapplicable!

EDITED lightly.

Docs are here:

Documentation

You’d pick one or the other if you wanted to use the words or -v / -q

root@gemini:/mnt/user/data/scripts/rclone# ./rclone ls . -vv --log-level ERROR --log-file blah.log
root@gemini:/mnt/user/data/scripts/rclone# cat blah.log
2025/12/07 06:37:36 CRITICAL: Can't set -v and --log-level
root@gemini:/mnt/user/data/scripts/rclone#

I think you have mixed --log-file and --log-level You can't provide multiple log levels at once the flags below do the same thing

  • --log-level=ERROR = -q = --quiet
  • --log-level=NOTICE = this is the default when no --log-level or -v/-q are specified
  • --log-level=INFO = -v = --verbose
  • --log-level=DEBUG = -v -v = -vv = --verbose=2

So in your command there is --log-level=ERROR and -vv remove either one, If you want debug level logging then remove --log-level=ERROR

    Thanks, both.

    My post did conflate the log-path switch with the log-level switch. (For, I wrote both of the following things. 1) ‘Commands that include both -–log-file=<path> and --verbose or -v or -vv fail without an error message.’ 2) ‘[O]ne [. .] command [. .] include[d] the following in its output: “CRITICAL: Can't set -v and --log-level”.') I apologise.

    That which threw me was indeed the synonymy between the verbosity switches (-q, -v,-v,-vv) and the log-level switches (log-level=ERROR, etc.). Perhaps there is no problem with the documentation here. Yet, I continue to believe that Rclone could do better than abort silently when one combines those switches in a way that it dislikes.

By making the error go to the log file, that’s where you’d find the error as it was directed to be in the log file.

exit code could be trapped as well.

By making the error go to the log file, that’s where you’d find the error as it was directed to be in the log file.

Good point. (Duh!)

   As to the exit code: I tend to run rclone via a script, and that script executes rclone via xargs, and xargs tends (I forget the details) to return only 0 or, for an error, 123.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.