Ability to "--dump filters" without forcing Debug level logging

What is the problem you are having with rclone?

In version 1.56.0, a change was made so that "--dump should imply -vv" (#5247). Before this change, adding the global flag "--dump filters" to a command would ALWAYS dump the filters regardless of what log level was set. With this change, there is no longer a way to "--dump filters" without getting tons of extra debug information. Is there any way to either exclude "--dump filters" from this change or change the implementation to instead of globally changing the log level to instead treat all the DumpFlags like "filters" and always dump them regardless of the log level since they were explicitly asked for in the command line arguments.

The rational is that you might have a command that includes something like --min-age 2d --max-age 3d and using "--dump filters" allows you to see what the exact date/time that rclone is using to filter on but you don't need to log the ton of debug details that -vv spits out.

What is your rclone version (output from rclone version)

rclone v1.56.2

  • os/version: ubuntu 16.04 (64 bit)
  • os/kernel: 4.4.0-210-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.8
  • go/linking: static
  • go/tags: none

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

Google Drive (via crypt)

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

rclone copy --min-age 2d --max-age 3d --dump filters /local/directory/path/ gcrypt:destdir/

The rclone config contents with secrets removed.

Not config related.

A log from the command with the -vv flag

N/A

hi, good point.

tho i think you should post using the feature template, not `help and support

If you were super curious, you can always run a command before and just grab the data and run again.

Dump tends to be for debugging, which is why I'd imagine it's setup like that.

felix@gemini:~$ rclone ls --dump filters GD:doesnotexist --min-age 2d --max-age 3d
2021/11/06 07:44:02 NOTICE: Automatically setting -vv as --dump is enabled
2021/11/06 07:44:02 DEBUG : --min-age 2d to 2021-11-04 07:44:02.681252157 -0400 EDT m=-172799.982035947
2021/11/06 07:44:02 DEBUG : --max-age 3d to 2021-11-03 07:44:02.681261096 -0400 EDT m=-259199.982027006
--- start filters ---
Last-modified date must be equal or greater than: 2021-11-03 07:44:02.681261096 -0400 EDT m=-259199.982027006
Last-modified date must be equal or less than: 2021-11-04 07:44:02.681252157 -0400 EDT m=-172799.982035947
--- File filter rules ---
--- Directory filter rules ---
--- end filters ---
2021/11/06 07:44:02 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "ls" "--dump" "filters" "GD:doesnotexist" "--min-age" "2d" "--max-age" "3d"]
2021/11/06 07:44:02 DEBUG : Creating backend with remote "GD:doesnotexist"
2021/11/06 07:44:02 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/11/06 07:44:02 DEBUG : Setting drive_pacer_min_sleep="10ms" from environment variable RCLONE_DRIVE_PACER_MIN_SLEEP
2021/11/06 07:44:02 DEBUG : Setting drive_pacer_burst="1000" from environment variable RCLONE_DRIVE_PACER_BURST
2021/11/06 07:44:02 DEBUG : GD: detected overridden config - adding "{TKSWb}" suffix to name
2021/11/06 07:44:02 DEBUG : Setting drive_pacer_min_sleep="10ms" from environment variable RCLONE_DRIVE_PACER_MIN_SLEEP
2021/11/06 07:44:02 DEBUG : Setting drive_pacer_burst="1000" from environment variable RCLONE_DRIVE_PACER_BURST
2021/11/06 07:44:03 DEBUG : fs cache: renaming cache item "GD:doesnotexist" to be canonical "GD{TKSWb}:doesnotexist"
2021/11/06 07:44:03 DEBUG : 4 go routines active
2021/11/06 07:44:03 Failed to ls: directory not found

And just run your command next.

I agree that this is a "workaround" but way less convenient then the way rclone worked before issue #5247 was resolved.

If you look at issue #5247, the reporter was perfectly fine with with just updating the documentation to reflect the necessity of manually increasing the log level to get their particular "--dump flag" to appear in the output log. Instead, a code change was made that I believe is a less flexible implementation than the original code and actually removes functionality from rclone.

I think there are many use cases to "--dump filters" without the need for debug level logging being forced. To me, it is just good practice if you have several filters set to always "--dump filters" with your "normal" output just to make your logging more complete and meaningful from a historical perspective (versus debugging perspective). I think the changes made to resolve #5247 should be rolled back and either just update the documentation for the "--debug flags" that require a higher debug level to be set OR come up with a better implementation such as always outputting/logging items that are directly specified via "--dump flag" regardless of the overall log level set.

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