Debugging for rclone go library

How do I turn on debugging if I'm using rclone as go library. I went through the code, but it seems client can't provide custom ConfigInfo into NewFs() function (which is where we specify debug config).
Issue I'm trying to debug: Connection lost error only for S3 and it looks like problem with concurrency.

Below is a sample code I'm using:

sftpConfig = configmap.Simple{
"type": "sftp",
"host": "sftp.testhost.com",
"port": "22",
"user": "testuser",
"pass": obscure.MustObscure("pass"),
"upload_path": "upload",
"subsystem": "sftp",
}

fs, err := sftp.NewFs(context.Background(),"sftp", path, config)
if err != nil {
return err
}

objectInfo := object.NewStaticObjectInfo("filename", now, int64(len(content)), true, nil, fs)
obj, err := targetFs.Put(context.Background(), bytes.NewReader(report), objectInfo)
if err != nil {
return err
}

What you want to do is set the LogLevel. There is an example for the rc which should translate into using the library directly.

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