Possible to get summary stats in log

Hi - hopefully very quick question if someone can kindly advise please.

What is the problem you are having with rclone?

tl;dr - Is there a way to produce a log file (e.g. NOTICE level), with just one set of summary stats at the end of the log? And without listing the files in "Transferring" stage?

Further info - While syncing, if choosing to output a log file with stats (e.g. with --stats-log-level NOTICE or --log-level -v), the stats are printed every 1m (or as defined in --stats=X). I would like to have the total statistical info at the end of the job (i.e. total number of transfers, checks etc), without the periodic printing.

It makes reviewing the errors and notices much more difficult, especially when mobile.

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

rclone v1.59.1

  • os/version: qts 5.0.1 (20220515) (64 bit)
  • os/kernel: 5.10.60-qnap (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.18.5
  • go/linking: static
  • go/tags: none

Not latest (1.59.2)

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

OneDrive, Google Drive

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

rclone sync od:/ /share/CACHEDEV1_DATA/OD --log-file=/share/CACHEDEV1_DATA/log.txt --stats-log-level NOTICE

The rclone config contents with secrets removed.

n/a

A log from the command with the -vv flag

n/a

I use:

--stats-one-line -v

i will give that one a try thank you

thank you - unfortunately i don't think this solution will work for me right now, as it removes some key words from the stats ("Checks", "Error" "Deleted" etc) which are used by other scripts when "reading" the rclone logs.

Also not sure but looks like it still printing every X mins as well (although as I'm typing this, I realise that may be due to another flag still in the rclone command...)

I think you want --stats-log-level NOTICE to show the stats without -v and --stats 10000h to only site the stats at the end.

Thank you I will try this later today.

It hurts that I hadn't thought to try this already.

Can confirm this worked thank you Nick

1 Like

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