feat: Improve resolution logging and verbose logging (#1341)

* feat: Improve resolution logging

Fixed #1336

Log target of the pre-built binaries which will be installed.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix args parsing: `quiet` & `verbose` cannot be set at the same time

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* feat: Implies `--log-level debug` if `--verbose` is set

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-09-02 19:38:24 +10:00 committed by GitHub
parent 214163c434
commit 3c5641610a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 14 deletions

View file

@ -93,15 +93,15 @@ impl ResolutionFetch {
let bin_files = &self.bin_files;
let name = &self.name;
let new_version = &self.new_version;
let target = fetcher.target();
debug!(
"Found a binary install source: {} ({})",
"Found a binary install source: {} ({target})",
fetcher.source_name(),
fetcher.target()
);
warn!(
"The package {name} v{new_version} will be downloaded from {}{}",
"The package {name} v{new_version} ({target}) has been downloaded from {}{}",
if fetcher.is_third_party() {
"third-party source "
} else {