diff --git a/proc-macros/src/render_server.rs b/proc-macros/src/render_server.rs index ba8b8934ed..9f9e0facba 100644 --- a/proc-macros/src/render_server.rs +++ b/proc-macros/src/render_server.rs @@ -298,7 +298,7 @@ impl RpcDescription { let #name: #ty = match seq.optional_next() { Ok(v) => v, Err(e) => { - #tracing::warn!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); + #tracing::debug!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); #pending.reject(e).await; return #sub_err::None; } @@ -310,7 +310,7 @@ impl RpcDescription { let #name: #ty = match seq.optional_next() { Ok(v) => v, Err(e) => { - #tracing::warn!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); + #tracing::debug!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); return #response_payload::Error(e); } }; @@ -321,7 +321,7 @@ impl RpcDescription { let #name: #ty = match seq.next() { Ok(v) => v, Err(e) => { - #tracing::warn!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); + #tracing::debug!(concat!("Error parsing optional \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); #pending.reject(e).await; return #sub_err::None; } @@ -333,7 +333,7 @@ impl RpcDescription { let #name: #ty = match seq.next() { Ok(v) => v, Err(e) => { - #tracing::warn!(concat!("Error parsing \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); + #tracing::debug!(concat!("Error parsing \"", stringify!(#name), "\" as \"", stringify!(#ty), "\": {:?}"), e); return #response_payload::Error(e); } }; @@ -399,7 +399,7 @@ impl RpcDescription { let parsed: ParamsObject<#(#types,)*> = match params.parse() { Ok(p) => p, Err(e) => { - #tracing::warn!("Failed to parse JSON-RPC params as object: {}", e); + #tracing::debug!("Failed to parse JSON-RPC params as object: {}", e); #pending.reject(e).await; return #sub_err::None; } @@ -418,7 +418,7 @@ impl RpcDescription { let parsed: ParamsObject<#(#types,)*> = match params.parse() { Ok(p) => p, Err(e) => { - #tracing::warn!("Failed to parse JSON-RPC params as object: {}", e); + #tracing::debug!("Failed to parse JSON-RPC params as object: {}", e); return #response_payload::Error(e); } }; diff --git a/server/src/server.rs b/server/src/server.rs index cdcbded9a0..ea796fccfc 100644 --- a/server/src/server.rs +++ b/server/src/server.rs @@ -161,7 +161,7 @@ where stopped = stop; } AcceptConnection::Err((e, stop)) => { - tracing::error!("Error while awaiting a new connection: {:?}", e); + tracing::debug!("Error while awaiting a new connection: {:?}", e); stopped = stop; } AcceptConnection::Shutdown => break, @@ -663,7 +663,7 @@ impl hyper::service::Service> for TowerSe response.map(|()| hyper::Body::empty()) } Err(e) => { - tracing::error!("Could not upgrade connection: {}", e); + tracing::debug!("Could not upgrade connection: {}", e); hyper::Response::new(hyper::Body::from(format!("Could not upgrade connection: {e}"))) } }; diff --git a/server/src/transport/http.rs b/server/src/transport/http.rs index b8b74ef2bc..2c4ea96085 100644 --- a/server/src/transport/http.rs +++ b/server/src/transport/http.rs @@ -82,7 +82,7 @@ pub(crate) async fn process_validated_request( Err(GenericTransportError::TooLarge) => return response::too_large(max_request_body_size), Err(GenericTransportError::Malformed) => return response::malformed(), Err(GenericTransportError::Inner(e)) => { - tracing::error!("Internal error reading request body: {}", e); + tracing::warn!("Internal error reading request body: {}", e); return response::internal_error(); } }; @@ -250,7 +250,7 @@ pub(crate) async fn execute_call(req: Request<'_>, call: CallData<'_, } MethodCallback::Subscription(_) | MethodCallback::Unsubscription(_) => { logger.on_call(name, params.clone(), logger::MethodKind::Unknown, TransportProtocol::Http); - tracing::error!("Subscriptions not supported on HTTP"); + tracing::warn!("Subscriptions not supported on HTTP"); MethodResponse::error(id, ErrorObject::from(ErrorCode::InternalError)) } }, diff --git a/types/src/params.rs b/types/src/params.rs index d23214dfb8..c02646dab0 100644 --- a/types/src/params.rs +++ b/types/src/params.rs @@ -179,7 +179,7 @@ impl<'a> ParamsSequence<'a> { b'[' | b',' => json = &json[1..], _ => { let errmsg = format!("Invalid params. Expected one of '[', ']' or ',' but found {json:?}"); - tracing::error!("[next_inner] {}", errmsg); + tracing::trace!("[next_inner] {}", errmsg); return Some(Err(invalid_params(errmsg))); } } @@ -193,7 +193,7 @@ impl<'a> ParamsSequence<'a> { Some(Ok(value)) } Err(e) => { - tracing::error!( + tracing::trace!( "[next_inner] Deserialization to {:?} failed. Error: {:?}, input JSON: {:?}", std::any::type_name::(), e,