diff --git a/crates/rmcp/src/handler/server.rs b/crates/rmcp/src/handler/server.rs index 13bb69f5..bda292ff 100644 --- a/crates/rmcp/src/handler/server.rs +++ b/crates/rmcp/src/handler/server.rs @@ -213,7 +213,7 @@ pub trait ServerHandler: Sized + Send + Sync + 'static { &self, context: NotificationContext, ) -> impl Future + Send + '_ { - tracing::info!("client initialized"); + tracing::trace!("client initialized"); std::future::ready(()) } fn on_roots_list_changed( diff --git a/crates/rmcp/src/service.rs b/crates/rmcp/src/service.rs index 7a0d3a90..71469b9a 100644 --- a/crates/rmcp/src/service.rs +++ b/crates/rmcp/src/service.rs @@ -557,9 +557,9 @@ where tokio::sync::mpsc::channel::>(SINK_PROXY_BUFFER_SIZE); let peer_info = peer.peer_info(); if R::IS_CLIENT { - tracing::info!(?peer_info, "Service initialized as client"); + tracing::trace!(?peer_info, "Service initialized as client"); } else { - tracing::info!(?peer_info, "Service initialized as server"); + tracing::trace!(?peer_info, "Service initialized as server"); } let mut local_responder_pool = @@ -615,7 +615,7 @@ where Event::PeerMessage(m) } else { // input stream closed - tracing::info!("input stream terminated"); + tracing::trace!("input stream terminated"); break QuitReason::Closed } } @@ -642,7 +642,7 @@ where } } _ = serve_loop_ct.cancelled() => { - tracing::info!("task cancelled"); + tracing::trace!("task cancelled"); break QuitReason::Cancelled } } @@ -670,7 +670,7 @@ where let _ = responder.send(response); if let Some(param) = cancellation_param { if let Some(responder) = local_responder_pool.remove(¶m.request_id) { - tracing::info!(id = %param.request_id, reason = param.reason, "cancelled"); + tracing::trace!(id = %param.request_id, reason = param.reason, "cancelled"); let _response_result = responder.send(Err(ServiceError::Cancelled { reason: param.reason.clone(), })); @@ -782,12 +782,12 @@ where notification, .. })) => { - tracing::info!(?notification, "received notification"); + tracing::trace!(?notification, "received notification"); // catch cancelled notification let mut notification = match notification.try_into() { Ok::(cancelled) => { if let Some(ct) = local_ct_pool.remove(&cancelled.params.request_id) { - tracing::info!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled"); + tracing::trace!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled"); ct.cancel(); } cancelled.into() @@ -855,7 +855,7 @@ where if let Err(e) = sink_close_result { tracing::error!(%e, "fail to close sink"); } - tracing::info!(?quit_reason, "serve finished"); + tracing::trace!(?quit_reason, "serve finished"); quit_reason }.instrument(current_span)); RunningService { diff --git a/crates/rmcp/src/transport/sse_server.rs b/crates/rmcp/src/transport/sse_server.rs index 15a65cb5..fc375358 100644 --- a/crates/rmcp/src/transport/sse_server.rs +++ b/crates/rmcp/src/transport/sse_server.rs @@ -88,7 +88,7 @@ async fn sse_handler( parts: Parts, ) -> Result>>, Response> { let session = session_id(); - tracing::info!(%session, ?parts, "sse connection"); + tracing::trace!(%session, ?parts, "sse connection"); use tokio_stream::{StreamExt, wrappers::ReceiverStream}; use tokio_util::sync::PollSender; let (from_client_tx, from_client_rx) = tokio::sync::mpsc::channel(64); @@ -246,7 +246,7 @@ impl SseServer { let ct = sse_server.config.ct.child_token(); let server = axum::serve(listener, service).with_graceful_shutdown(async move { ct.cancelled().await; - tracing::info!("sse server cancelled"); + tracing::trace!("sse server cancelled"); }); tokio::spawn( async move { diff --git a/crates/rmcp/src/transport/streamable_http_client.rs b/crates/rmcp/src/transport/streamable_http_client.rs index 20159a01..157c7d4e 100644 --- a/crates/rmcp/src/transport/streamable_http_client.rs +++ b/crates/rmcp/src/transport/streamable_http_client.rs @@ -306,10 +306,10 @@ impl Worker for StreamableHttpClientWorker { client.delete_session(url, session_id.clone(), None).await; match delete_session_result { Ok(_) => { - tracing::info!(session_id = session_id.as_ref(), "delete session success") + tracing::trace!(session_id = session_id.as_ref(), "delete session success") } Err(StreamableHttpError::SeverDoesNotSupportDeleteSession) => { - tracing::info!( + tracing::trace!( session_id = session_id.as_ref(), "server doesn't support delete session" ) diff --git a/crates/rmcp/src/transport/streamable_http_server/session/local.rs b/crates/rmcp/src/transport/streamable_http_server/session/local.rs index c1c4f893..0cd11026 100644 --- a/crates/rmcp/src/transport/streamable_http_server/session/local.rs +++ b/crates/rmcp/src/transport/streamable_http_server/session/local.rs @@ -883,7 +883,7 @@ pub fn create_local_session( let (event_tx, event_rx) = tokio::sync::mpsc::channel(config.channel_capacity); let (common_tx, _) = tokio::sync::mpsc::channel(config.channel_capacity); let common = CachedTx::new_common(common_tx); - tracing::info!(session_id = ?id, "create new session"); + tracing::trace!(session_id = ?id, "create new session"); let handle = LocalSessionHandle { event_tx, id: id.clone(), diff --git a/crates/rmcp/src/transport/streamable_http_server/tower.rs b/crates/rmcp/src/transport/streamable_http_server/tower.rs index 90473b32..efadb457 100644 --- a/crates/rmcp/src/transport/streamable_http_server/tower.rs +++ b/crates/rmcp/src/transport/streamable_http_server/tower.rs @@ -399,7 +399,7 @@ where }); Ok(sse_stream_response( ReceiverStream::new(receiver).map(|message| { - tracing::info!(?message); + tracing::trace!(?message); ServerSseMessage { event_id: None, message: message.into(),