From b335ea504e95a012b8b8e873128171318caa9caa Mon Sep 17 00:00:00 2001 From: s0c5 Date: Mon, 19 Aug 2024 14:22:43 +0200 Subject: [PATCH] style: update log message levels for clarity --- sube/src/builder.rs | 5 +---- sube/src/lib.rs | 5 +---- sube/src/meta_ext.rs | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sube/src/builder.rs b/sube/src/builder.rs index b31a5ef..58374e3 100644 --- a/sube/src/builder.rs +++ b/sube/src/builder.rs @@ -66,10 +66,7 @@ impl<'a> SubeBuilder<'a, (), ()> { let block = url .query_pairs() .find(|(k, _)| k == "at") - .map(|(_, v)| { - log::info!("hello world{:?}", v); - v.parse::().expect("at to be a number") - }); + .map(|(_, v)| v.parse::().expect("at query params must be a number")); let path = url.path(); diff --git a/sube/src/lib.rs b/sube/src/lib.rs index 899ea11..b4a0b67 100644 --- a/sube/src/lib.rs +++ b/sube/src/lib.rs @@ -78,9 +78,7 @@ async fn query<'m>( path: &str, block: Option, ) -> Result> { - log::info!("path {}", path); let (pallet, item_or_call, mut keys) = parse_uri(path).ok_or(Error::BadInput)?; - log::info!("pallet {}", pallet); let pallet = meta .pallet_by_name(&pallet) .ok_or_else(|| Error::PalletNotFound(pallet))?; @@ -214,11 +212,9 @@ where match response { Response::Value(value) => { - log::info!("{:?}", serde_json::to_string(&value)); let str = serde_json::to_string(&value).expect("wrong account info"); let account_info: AccountInfo = serde_json::from_str(&str).expect("it must serialize"); - log::info!("{}", &account_info.nonce); Ok(account_info.nonce) } _ => Err(Error::AccountNotFound), @@ -392,6 +388,7 @@ pub trait Backend { async fn get_storage_item(&self, key: RawKey, block: Option) -> crate::Result { let res = self.get_storage_items(vec![key], block).await?; + res.into_iter() .next() .map(|(_, v)| v) diff --git a/sube/src/meta_ext.rs b/sube/src/meta_ext.rs index 4245192..c533f7e 100644 --- a/sube/src/meta_ext.rs +++ b/sube/src/meta_ext.rs @@ -199,7 +199,7 @@ pub trait EntryTy { .into_iter() .enumerate() .map(|(i, type_id)| { - log::info!("type_call_ids.i={} type_call_ids.type_id={}", i, type_id); + log::trace!("type_call_ids.i={} type_call_ids.type_id={}", i, type_id); let k = map_keys.get(i); let hasher = hashers.get(i).expect("hasher not found");