RCLONE_VERBOSE environment variable - how to use

to set the output mode for a command

for info ouput
RCLONE_VERBOSE=1

for verbose output
RCLONE_VERBOSE=2

for this script

export RCLONE_VERBOSE=1
rclone version

export RCLONE_VERBOSE=2
rclone version

this is the output

rclone v1.56.0
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1016-raspi (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.16.5
- go/linking: static
- go/tags: none
2021/08/31 18:13:39 DEBUG : rclone: Version "v1.56.0" starting with parameters ["rclone" "version"]
rclone v1.56.0
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1016-raspi (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.16.5
- go/linking: static
- go/tags: none
2021/08/31 18:13:39 DEBUG : rclone: Version "v1.56.0" finishing with parameters ["rclone" "version"]

an alternative is to use https://rclone.org/docs/#log-level-level

for info output
RCLONE_LOG_LEVEL=INFO
for debug output
RCLONE_LOG_LEVEL=DEBUG

this script

export RCLONE_LOG_LEVEL=INFO
rclone version

export RCLONE_LOG_LEVEL=DEBUG
rclone version

the output

rclone v1.56.0
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1016-raspi (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.16.5
- go/linking: static
- go/tags: none
2021/08/31 18:31:27 DEBUG : Setting --log-level "DEBUG" from environment variable RCLONE_LOG_LEVEL="DEBUG"
2021/08/31 18:31:27 DEBUG : rclone: Version "v1.56.0" starting with parameters ["rclone" "version"]
rclone v1.56.0
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1016-raspi (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.16.5
- go/linking: static
- go/tags: none
2021/08/31 18:31:27 DEBUG : rclone: Version "v1.56.0" finishing with parameters ["rclone" "version"]
1 Like

Thank you for also including the alternate RCLONE_LOG_LEVEL I didn't think to use that

sure and welcome to the forum!

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