From 6791807f3f73b9744ad644c28c100bcc9add9ebc Mon Sep 17 00:00:00 2001 From: George Miao Date: Sun, 23 Oct 2022 09:28:00 -0400 Subject: [PATCH] chore: fix log level --- src/lib.rs | 8 ++++---- src/sync.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ea42d83..fc3e440 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -764,14 +764,14 @@ impl TransClient { .checked_sub(1) .ok_or(TransError::MaxRetriesReached)?; - info!("Loaded auth: {:?}", &self.auth); + debug!("Loaded auth: {:?}", &self.auth); let rq = match &self.session_id { None => self.rpc_request(), Some(id) => self.rpc_request().header("X-Transmission-Session-Id", id), } .json(&request); - info!( + debug!( "Request body: {:?}", rq.try_clone() .expect("Unable to get the request body") @@ -787,10 +787,10 @@ impl TransClient { .to_str()?; self.session_id = Some(String::from(session_id)); - info!("Got new session_id: {}. Retrying request.", session_id); + debug!("Got new session_id: {}. Retrying request.", session_id); } else { let rpc_response: RpcResponse = rsp.json().await?; - info!("Response body: {:#?}", rpc_response); + debug!("Response body: {:#?}", rpc_response); return Ok(rpc_response); } diff --git a/src/sync.rs b/src/sync.rs index 307f4f9..a0b8081 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -743,14 +743,14 @@ impl SharableTransClient { .checked_sub(1) .ok_or(TransError::MaxRetriesReached)?; - info!("Loaded auth: {:?}", &self.auth); + debug!("Loaded auth: {:?}", &self.auth); let rq = match &self.session_id.read().expect("lock being poisoned").deref() { None => self.rpc_request(), Some(id) => self.rpc_request().header("X-Transmission-Session-Id", id), } .json(&request); - info!( + debug!( "Request body: {:?}", rq.try_clone() .expect("Unable to get the request body") @@ -767,10 +767,10 @@ impl SharableTransClient { *self.session_id.write().expect("lock being poisoned") = Some(String::from(session_id)); - info!("Got new session_id: {}. Retrying request.", session_id); + debug!("Got new session_id: {}. Retrying request.", session_id); } else { let rpc_response: RpcResponse = rsp.json().await?; - info!("Response body: {:#?}", rpc_response); + debug!("Response body: {:#?}", rpc_response); return Ok(rpc_response); }