Skip to content
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

Too much output during normal operation #959

Closed
troelsarvin opened this issue Dec 2, 2023 · 4 comments · Fixed by #961
Closed

Too much output during normal operation #959

troelsarvin opened this issue Dec 2, 2023 · 4 comments · Fixed by #961
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@troelsarvin
Copy link
Contributor

troelsarvin commented Dec 2, 2023

When running rustic in a batch job, you want to have rustic be silent, unless something bad happens.

But when I run rustic like this:
rustic --no-progress --log-level warn backup
rustic outputs "using config /etc/rustic/rustic.toml" on stderr.
And on stdout, it prints:
Files: 0 new, 1 changed, 2738 unchanged
Dirs: 0 new, 13 changed, 834 unchanged
Added to the repo: 13.4 kiB (raw: 66.6 kiB)
processed 2739 files, 92.6 MiB
snapshot 8ccb94a0 successfully saved.

The message on stderr is not an error message, so I claim it should be sent to stdout, if at all.
And I claim that with a "warn" log level, it should not write statistics etc.

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Dec 2, 2023
@aawsome
Copy link
Member

aawsome commented Dec 3, 2023

Thanks for opening this issue @troelsarvin !

About the statistics: This is just the output of the command, no logging. If you don't like the output, redirect it to /dev/null. Alternatively, you could propose to add some flag like --silent, but please open another issue for that if you want it.

About the "using config /etc/rustic/rustic.toml" on stderr: This is by purpose on stderr (as all log output) - there are commands which create JSON output on stdout, and users want to process stdout by some scripts. Logging on stdout would break the JSON output.
I agree however that it should be treated as log message - and ignored if --log-level is not high enough. This will be fixed by #961.

@teon
Copy link

teon commented Apr 18, 2024

@aawsome I would like to "upvote" @troelsarvin comments and maybe begin a discussion that:

  1. Typical unix approach is: be silent until something important is worth mentioning (or the --verbose is explicitly added)
  2. A lot of log messages are in my opinion DEBUG messages that for a normal user have no value, example:
    [INFO] read_task; read_end_buffer_size=1024 - what this message brings of value when using to a user?
  3. And even despite all the above a typical (what I'm used to) practice of INFO messages are "business messages" that inform about events and states that happened and are relevant to the user - a lot of messages are not that type...

Just my 2cents.

Ps. Love your guys work! thank you for an awesome tool!

@aawsome
Copy link
Member

aawsome commented Apr 18, 2024

@teon You can easily use something like

log-level = "warn"

in your config profile. Also the option --quiet is already implemented.

Or did you want to start a discussion about what are good default values?

About that specific [INFO] read_task; read_end_buffer_size=1024 - this is a info log which comes out of opendal, IIRC. I agree that this seems to be "wrong" severity from a rustic's user perspective, but this can be only changed within opendal (or its dependencies)

@teon
Copy link

teon commented Apr 18, 2024

@aawsome yes i’ve started a general discussion about the approach ;-) have a good day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants