Json log file containing non json formatted errors

What is the problem you are having with rclone?

I'm testing rclone json logging to see what outputs appear under predetermined circumstances.

In this case I told rclone to sync to a sftp site that it doesn't have LIST permission on, and it's putting non JSON formatted errors in the log.

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

C:\Backup\Scripts>.\rclone\rclone version
rclone v1.67.0

  • os/version: Microsoft Windows Server 2019 Standard 1809 (64 bit)
  • os/kernel: 10.0.17763.6054 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.22.4
  • go/linking: static
  • go/tags: cmount

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

sftp

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

rclone sync --size-only --progress --no-update-dir-modtime -v --log-file=ls.txt --use-json-log  <source> host:<target>

A log from the command with the -vv flag

{"level":"debug","msg":"Connection failed, closing: permission denied","object":"******","objectType":"*sftp.Fs","source":"sftp/sftp.go:782","time":"2024-07-10T11:18:14.572876-06:00"}
2024/07/10 11:18:14 Failed to create file system for "******": stat failed: permission denied

Note that's with -vv.

With -v I get:

2024/07/10 11:10:00 Failed to create file system for "host:<target>": stat failed: permission denied

Also note I believe this has been brought up before:

Lastly, what I'm trying to do is parse out stats from the log for reporting purposes. Parsing the log seems to be the only way to get it?

Also see Rclone trigger script on completion with variables

I'm not familiar with Go, else I'd create a pull request for this.

Thank you much,
Charles

There is a current issue about this at the moment

The problem is that the fatal errors are not output with JSON

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