mirror of
https://github.com/rclone/rclone.git
synced 2025-12-15 15:53:41 +00:00
fs: Add string alternatives for setting options over the rc
Before this change options were read and set in native format. This means for example nanoseconds for durations or an integer for enumerated types, which isn't very convenient for humans. This change enables these types to be set with a string with the syntax as used in the command line instead, so `"10s"` rather than `10000000000` or `"DEBUG"` rather than `8` for log level.
This commit is contained in:
@@ -89,17 +89,18 @@ changed like this.
|
||||
|
||||
For example:
|
||||
|
||||
This sets DEBUG level logs (-vv)
|
||||
This sets DEBUG level logs (-vv) (these can be set by number or string)
|
||||
|
||||
rclone rc options/set --json '{"main": {"LogLevel": "DEBUG"}}'
|
||||
rclone rc options/set --json '{"main": {"LogLevel": 8}}'
|
||||
|
||||
And this sets INFO level logs (-v)
|
||||
|
||||
rclone rc options/set --json '{"main": {"LogLevel": 7}}'
|
||||
rclone rc options/set --json '{"main": {"LogLevel": "INFO"}}'
|
||||
|
||||
And this sets NOTICE level logs (normal without -v)
|
||||
|
||||
rclone rc options/set --json '{"main": {"LogLevel": 6}}'
|
||||
rclone rc options/set --json '{"main": {"LogLevel": "NOTICE"}}'
|
||||
`,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user