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

feat(cli)!: set log level to INFO/DEBUG on --quiet/--verbose if RUSTUP_LOG is unset #3987

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Aug 10, 2024

In the current setting, debug!() lines are not printed out even if I use RUSTUP_LOG=rustup=DEBUG. This logic used to make sense when we didn't have support for directives, but now it feels a bit awkward.

As a solution, I decided to follow the basic idea of #3911:

  • RUSTUP_LOG decides ultimately when it's present.
  • When RUSTUP_LOG is unset, --quiet or --verbose gets to decide the log verbosity.

Overall, now --quiet and --verbose behave more like what would be expected from general CLI applications.

This applies to both rustup-mode (i.e. rustup) and setup-mode (i.e. rustup-init).

@rami3l rami3l added this to the 1.28.0 milestone Aug 10, 2024
@rami3l rami3l force-pushed the feat/more-consistent-verbose branch from ce06464 to 9a89b21 Compare August 10, 2024 12:44
src/cli/log.rs Show resolved Hide resolved
@rami3l rami3l requested a review from djc August 10, 2024 12:47
@rami3l rami3l marked this pull request as ready for review August 10, 2024 12:48
@rami3l rami3l removed the request for review from djc August 10, 2024 12:58
@rami3l rami3l marked this pull request as draft August 10, 2024 12:58
@rami3l rami3l force-pushed the feat/more-consistent-verbose branch from 9a89b21 to 4dd99b0 Compare August 10, 2024 13:02
@rami3l rami3l requested a review from djc August 10, 2024 13:03
@rami3l rami3l marked this pull request as ready for review August 10, 2024 13:03
@rami3l rami3l force-pushed the feat/more-consistent-verbose branch 2 times, most recently from 1eb60b5 to 349feec Compare August 11, 2024 03:28
@rami3l rami3l changed the title feat(cli)!: set log level to DEBUG on --verbose if RUSTUP_LOG is unset feat(cli)!: set log level to INFO/DEBUG on --quiet/--verbose if RUSTUP_LOG is unset Aug 11, 2024
src/cli/setup_mode.rs Outdated Show resolved Hide resolved
src/cli/setup_mode.rs Outdated Show resolved Hide resolved
src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
@rami3l rami3l force-pushed the feat/more-consistent-verbose branch from 349feec to f1d1fdb Compare August 22, 2024 07:01
@rami3l rami3l requested a review from djc August 22, 2024 07:01
src/cli/setup_mode.rs Outdated Show resolved Hide resolved
@djc
Copy link
Contributor

djc commented Sep 4, 2024

Sorry for the slow feedback, this is looking good!

@rami3l rami3l force-pushed the feat/more-consistent-verbose branch from f1d1fdb to 915a84e Compare September 4, 2024 09:24
@rami3l rami3l force-pushed the feat/more-consistent-verbose branch from 915a84e to b15e0a0 Compare September 4, 2024 09:27
@rami3l rami3l enabled auto-merge September 4, 2024 09:28
@rami3l rami3l added this pull request to the merge queue Sep 4, 2024
Merged via the queue into rust-lang:master with commit d288805 Sep 4, 2024
27 checks passed
@rami3l rami3l deleted the feat/more-consistent-verbose branch September 4, 2024 10:10
@rami3l rami3l mentioned this pull request Oct 6, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants