-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
rclone: add option to set log-level #8105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Side note: [EDIT] I found the standalone tests now, but I'm not sure how to cover this yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change makes sense to me, as long as @ttrssreal doesn't have any concerns.
|
Can we move the new option to the |
Good point! I'll move it |
751bf18 to
7745db6
Compare
|
Moved the option and updated the commit/PR description. WDYT? |
8b96288 to
abcf8a2
Compare
|
imo I'd prefer most settings that have an application default behavior don't have a configuration default so that a user gets the default app behavior. |
So, should I remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like this
|
I agree with @khaneliman about using the application default here. Looks good otherwise, logging should definitely be configurable. Thanks for the PR! |
34b7b48 to
8f51d2e
Compare
Add an option to set rclone's log-level per mount:
programs.rclone.remotes.<name>.mounts.<name>.logLevel = "DEBUG";
If no value is set, it'll use rclone's implicit default ("NOTICE")
Previously, the debug log-level got enforced (via "-vv"),
which caused noisy logs, and there was no easy way to change that.
Note: rclone global-flags can't be configured in the config file,
so this uses the environment variable approach.
references:
- https://rclone.org/docs/#logging
- https://rclone.org/docs/#v-vv-verbose
If no value is given, use the implicit default of rclone instead of redefining it through the options Co-authored-by: Austin Horstman <[email protected]>
8f51d2e to
6d1c26a
Compare
|
Thx for the support! I applied the suggestions of @khaneliman and updated commit and PR description (also removed the mention of the default from the title, to prevent confusion later on) |
Description
Add an option to set rclone's log-level per mount:
If no value is set, it'll use rclone's implicit default ("NOTICE")
Previously, the debug log-level got enforced (via "-vv"), which caused noisy logs, and there was no easy way to change that.
Note: rclone global-flags can't be configured in the config file. So, this uses the environment variable approach.
references:
Checklist
Change is backwards compatible.
Code formatted with
nix fmtornix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.Code tested through
nix run .#tests -- test-allornix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
If this PR adds an exciting new feature or contains a breaking change.