Skip to content

Commit 560ae3e

Browse files
committed
Adjust log levels for trace logging
1 parent fbc7ab7 commit 560ae3e

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

crates/rmcp/src/handler/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub trait ServerHandler: Sized + Send + Sync + 'static {
213213
&self,
214214
context: NotificationContext<RoleServer>,
215215
) -> impl Future<Output = ()> + Send + '_ {
216-
tracing::info!("client initialized");
216+
tracing::trace!("client initialized");
217217
std::future::ready(())
218218
}
219219
fn on_roots_list_changed(

crates/rmcp/src/service.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@ where
557557
tokio::sync::mpsc::channel::<TxJsonRpcMessage<R>>(SINK_PROXY_BUFFER_SIZE);
558558
let peer_info = peer.peer_info();
559559
if R::IS_CLIENT {
560-
tracing::info!(?peer_info, "Service initialized as client");
560+
tracing::trace!(?peer_info, "Service initialized as client");
561561
} else {
562-
tracing::info!(?peer_info, "Service initialized as server");
562+
tracing::trace!(?peer_info, "Service initialized as server");
563563
}
564564

565565
let mut local_responder_pool =
@@ -615,7 +615,7 @@ where
615615
Event::PeerMessage(m)
616616
} else {
617617
// input stream closed
618-
tracing::info!("input stream terminated");
618+
tracing::trace!("input stream terminated");
619619
break QuitReason::Closed
620620
}
621621
}
@@ -642,7 +642,7 @@ where
642642
}
643643
}
644644
_ = serve_loop_ct.cancelled() => {
645-
tracing::info!("task cancelled");
645+
tracing::trace!("task cancelled");
646646
break QuitReason::Cancelled
647647
}
648648
}
@@ -670,7 +670,7 @@ where
670670
let _ = responder.send(response);
671671
if let Some(param) = cancellation_param {
672672
if let Some(responder) = local_responder_pool.remove(&param.request_id) {
673-
tracing::info!(id = %param.request_id, reason = param.reason, "cancelled");
673+
tracing::trace!(id = %param.request_id, reason = param.reason, "cancelled");
674674
let _response_result = responder.send(Err(ServiceError::Cancelled {
675675
reason: param.reason.clone(),
676676
}));
@@ -782,12 +782,12 @@ where
782782
notification,
783783
..
784784
})) => {
785-
tracing::info!(?notification, "received notification");
785+
tracing::trace!(?notification, "received notification");
786786
// catch cancelled notification
787787
let mut notification = match notification.try_into() {
788788
Ok::<CancelledNotification, _>(cancelled) => {
789789
if let Some(ct) = local_ct_pool.remove(&cancelled.params.request_id) {
790-
tracing::info!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled");
790+
tracing::trace!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled");
791791
ct.cancel();
792792
}
793793
cancelled.into()
@@ -855,7 +855,7 @@ where
855855
if let Err(e) = sink_close_result {
856856
tracing::error!(%e, "fail to close sink");
857857
}
858-
tracing::info!(?quit_reason, "serve finished");
858+
tracing::trace!(?quit_reason, "serve finished");
859859
quit_reason
860860
}.instrument(current_span));
861861
RunningService {

crates/rmcp/src/transport/sse_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async fn sse_handler(
8888
parts: Parts,
8989
) -> Result<Sse<impl Stream<Item = Result<Event, io::Error>>>, Response<String>> {
9090
let session = session_id();
91-
tracing::info!(%session, ?parts, "sse connection");
91+
tracing::trace!(%session, ?parts, "sse connection");
9292
use tokio_stream::{StreamExt, wrappers::ReceiverStream};
9393
use tokio_util::sync::PollSender;
9494
let (from_client_tx, from_client_rx) = tokio::sync::mpsc::channel(64);
@@ -246,7 +246,7 @@ impl SseServer {
246246
let ct = sse_server.config.ct.child_token();
247247
let server = axum::serve(listener, service).with_graceful_shutdown(async move {
248248
ct.cancelled().await;
249-
tracing::info!("sse server cancelled");
249+
tracing::trace!("sse server cancelled");
250250
});
251251
tokio::spawn(
252252
async move {

crates/rmcp/src/transport/streamable_http_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ impl<C: StreamableHttpClient> Worker for StreamableHttpClientWorker<C> {
306306
client.delete_session(url, session_id.clone(), None).await;
307307
match delete_session_result {
308308
Ok(_) => {
309-
tracing::info!(session_id = session_id.as_ref(), "delete session success")
309+
tracing::trace!(session_id = session_id.as_ref(), "delete session success")
310310
}
311311
Err(StreamableHttpError::SeverDoesNotSupportDeleteSession) => {
312-
tracing::info!(
312+
tracing::trace!(
313313
session_id = session_id.as_ref(),
314314
"server doesn't support delete session"
315315
)

crates/rmcp/src/transport/streamable_http_server/session/local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ pub fn create_local_session(
883883
let (event_tx, event_rx) = tokio::sync::mpsc::channel(config.channel_capacity);
884884
let (common_tx, _) = tokio::sync::mpsc::channel(config.channel_capacity);
885885
let common = CachedTx::new_common(common_tx);
886-
tracing::info!(session_id = ?id, "create new session");
886+
tracing::trace!(session_id = ?id, "create new session");
887887
let handle = LocalSessionHandle {
888888
event_tx,
889889
id: id.clone(),

crates/rmcp/src/transport/streamable_http_server/tower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ where
399399
});
400400
Ok(sse_stream_response(
401401
ReceiverStream::new(receiver).map(|message| {
402-
tracing::info!(?message);
402+
tracing::trace!(?message);
403403
ServerSseMessage {
404404
event_id: None,
405405
message: message.into(),

0 commit comments

Comments
 (0)