Summary of operation in logfile

First off: Thanks for an excellent tool! Good work!

Is there a way to get a summary of an operation at the end of a logfile, and not just at the end of the output? I run my backups silently (on Windows) and I parse the logfile and send it to myself I have tried '--stats-log-level NOTICE' but this seems to only output a summary on stdout and not in the log. I tried '--log-level NOTICE' but this only seemed to include the periodic stats messages in the logfile, but no summary. If there a way to achieve this?

Thanks!

Morgan

I don't use anything special as the defaults handle printing out a summary at the end like this:

# Move older local files to the cloud
/usr/bin/rclone move /data/local/ gcrypt: --log-file /opt/rclone/logs/upload.log -v --drive-chunk-size 64M --exclude-from /opt/rclone/scripts/excludes --delete-empty-src-dirs --fast-list

That's the last few lines of my log file that is written.

Transferred:      253.972G / 253.972 GBytes, 100%, 87.780 MBytes/s, ETA 0s
Errors:                 0
Checks:                70 / 70, 100%
Transferred:           35 / 35, 100%
Elapsed time:    49m22.7s

Strange. I don't get that in my logfile. I use the following arguments:
--log-file $LogFilePath --stats-log-level NOTICE --log-level NOTICE

I believe that '--log-level NOTICE' is the same as '-v'?

All I get are some stats at the default interval of 1 minute:
2019/08/22 03:05:53 NOTICE:
Transferred: 303 / 303 Bytes, 100%, 1 Bytes/s, ETA 0s
Errors: 0
Checks: 87094 / 87094, 100%
Transferred: 2 / 2, 100%
Elapsed time: 5m2.2s

2019/08/22 03:06:21 NOTICE:
Transferred: 303 / 303 Bytes, 100%, 0 Bytes/s, ETA 0s
Errors: 0
Checks: 97587 / 97587, 100%
Transferred: 2 / 2, 100%
Elapsed time: 5m30.5s

Morgan

What's the full command you are running?

All the parameters are in an array:
"copy"
"e:\files"
"remote:files"
"--backup-dir"
"remote:$timestamp"
"--config"
"$rcloneConfigFile"
"--log-file"
$LogFilePath
"--log-level NOTICE"
"--exclude Thumbs.db"

NOTICE is the default.

I'm assuming you are running the latest version as well with 1.48? Can you share a log file?

Yup, I'm on 1.48.

--log-file + --log-level INFO | -v: Summary in logfile, but also all INFO events which is more than I want.
--log-file: nothing in log file at all (unless maybe if there are errors)

So it seems if I want a summary I need to have -v | --log-level INFO.

The reason I got nothing in the log file using the arguments I supplied earlier was that --log-level was set to NOTICE, which does not produce any output in the log file (unless error), even when there are new files e.g.

M

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