How to set log file path for rclone rc

I am trying to use rclone rc options/set to define the location of log file.
I have two questions:
What key I should use when creating --json '{"main":{"LogLevel":8}}' to set log path?
The second question is how I can set the log file to be over written in each run?
Thanks for the help

It looks like you can't set --log-file over the rc yet!

You want the log to not be opened in append mode... There isn't an option for that either yet, you.d have to truncate the log before each run

1 Like

A good solution is often to set a generated date as part of the filename, so each log is separate.
Then if you wanted that to automatically be cleaned up a script could do that pretty easily and delete for example any of the logfiles with dates older than a week.

But as NCW says, the logging options directly from rclone are fairly basic right now, so if you want some thing more fancy you probably have to script it.

1 Like

Thanks ncw and thestigma
So It seems that I should set this option as part of 'rclone rcd' command on remote machine, then following thestigma's suggestion for naming the log file.

Thanks a lot guys

Yea you should just be able to put %time% in the filename (windows).
For Linux it will be some other variable I'm sure - easy to google.

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