Improve debug! logging

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-06 23:23:48 +10:00
parent bc71a1b136
commit a295fe9161
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -12,6 +12,7 @@ use std::{
use binstalk_downloader::{download::Download, remote};
use compact_str::{format_compact, CompactString, ToCompactString};
use tokio::sync::OnceCell;
use tracing::debug;
use url::Url;
mod common;
@ -213,6 +214,8 @@ impl GhApiClient {
}
pub async fn get_repo_info(&self, repo: &GhRepo) -> Result<Option<RepoInfo>, GhApiError> {
debug!("get_repo_info is called on {repo:?}");
match self
.do_fetch(
repo_info::fetch_repo_info_graphql_api,
@ -246,6 +249,8 @@ impl GhApiClient {
let res = once_cell
.get_or_try_init(|| {
Box::pin(async {
debug!("has_release_artifact is called on {release:?}, {artifact_name}");
match self
.do_fetch(
release_artifacts::fetch_release_artifacts_graphql_api,