mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Improve derbugg logging (#1738)
* Improve derbugg logging Make it more readable Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix excessive logging Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a2d2c5d85c
commit
4687726c66
10 changed files with 54 additions and 15 deletions
|
@ -55,7 +55,12 @@ impl DataVerifier for Sha256Digest {
|
|||
}
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
#[instrument(
|
||||
skip(client, crate_url),
|
||||
fields(
|
||||
crate_url = format_args!("{crate_url}"),
|
||||
),
|
||||
)]
|
||||
pub(super) async fn parse_manifest(
|
||||
client: Client,
|
||||
crate_name: &str,
|
||||
|
|
|
@ -105,7 +105,12 @@ async fn fetch_crate_cratesio_version_matched(
|
|||
|
||||
/// Find the crate by name, get its latest stable version matches `version_req`,
|
||||
/// retrieve its Cargo.toml and infer all its bins.
|
||||
#[instrument]
|
||||
#[instrument(
|
||||
skip(client),
|
||||
fields(
|
||||
version_req = format_args!("{version_req}"),
|
||||
)
|
||||
)]
|
||||
pub async fn fetch_crate_cratesio_api(
|
||||
client: Client,
|
||||
name: &str,
|
||||
|
|
|
@ -97,7 +97,12 @@ impl GitRegistry {
|
|||
)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
#[instrument(
|
||||
skip(self, client, version_req),
|
||||
fields(
|
||||
version_req = format_args!("{version_req}"),
|
||||
),
|
||||
)]
|
||||
pub async fn fetch_crate_matched(
|
||||
&self,
|
||||
client: Client,
|
||||
|
|
|
@ -78,7 +78,13 @@ impl SparseRegistry {
|
|||
)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
#[instrument(
|
||||
skip(self, client, version_req),
|
||||
fields(
|
||||
registry_url = format_args!("{}", self.url),
|
||||
version_req = format_args!("{version_req}"),
|
||||
)
|
||||
)]
|
||||
pub async fn fetch_crate_matched(
|
||||
&self,
|
||||
client: Client,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue