Skip to content

Commit 9a51eef

Browse files
committed
chore: reduce noisy logging
1 parent c30d806 commit 9a51eef

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

crates/rmcp/src/service.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,9 @@ where
480480
>(SINK_PROXY_BUFFER_SIZE);
481481

482482
if R::IS_CLIENT {
483-
tracing::info!(?peer_info, "Service initialized as client");
483+
tracing::debug!(?peer_info, "Service initialized as client");
484484
} else {
485-
tracing::info!(?peer_info, "Service initialized as server");
485+
tracing::debug!(?peer_info, "Service initialized as server");
486486
}
487487

488488
let (peer, mut peer_proxy) = <Peer<R>>::new(id_provider, peer_info);
@@ -521,7 +521,7 @@ where
521521
Event::PeerMessage(m.into_message())
522522
} else {
523523
// input stream closed
524-
tracing::info!("input stream terminated");
524+
tracing::debug!("input stream terminated");
525525
break QuitReason::Closed
526526
}
527527
}
@@ -533,7 +533,7 @@ where
533533
}
534534
}
535535
_ = serve_loop_ct.cancelled() => {
536-
tracing::info!("task cancelled");
536+
tracing::debug!("task cancelled");
537537
break QuitReason::Cancelled
538538
}
539539
};
@@ -588,7 +588,7 @@ where
588588
let _ = responder.send(response);
589589
if let Some(param) = cancellation_param {
590590
if let Some(responder) = local_responder_pool.remove(&param.request_id) {
591-
tracing::info!(id = %param.request_id, reason = param.reason, "cancelled");
591+
tracing::debug!(id = %param.request_id, reason = param.reason, "cancelled");
592592
let _response_result = responder.send(Err(ServiceError::Cancelled {
593593
reason: param.reason.clone(),
594594
}));
@@ -612,11 +612,11 @@ where
612612
let result = service.handle_request(request, context).await;
613613
let response = match result {
614614
Ok(result) => {
615-
tracing::info!(%id, ?result, "response message");
615+
tracing::debug!(%id, ?result, "response message");
616616
Message::Response(result, id)
617617
}
618618
Err(error) => {
619-
tracing::warn!(%id, ?error, "response error");
619+
tracing::debug!(%id, ?error, "response error");
620620
Message::Error(error, id)
621621
}
622622
};
@@ -625,12 +625,12 @@ where
625625
}
626626
}
627627
Event::PeerMessage(Message::Notification(notification)) => {
628-
tracing::info!(?notification, "received notification");
628+
tracing::debug!(?notification, "received notification");
629629
// catch cancelled notification
630630
let notification = match notification.try_into() {
631631
Ok::<CancelledNotification, _>(cancelled) => {
632632
if let Some(ct) = local_ct_pool.remove(&cancelled.params.request_id) {
633-
tracing::info!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled");
633+
tracing::debug!(id = %cancelled.params.request_id, reason = cancelled.params.reason, "cancelled");
634634
ct.cancel();
635635
}
636636
cancelled.into()
@@ -669,7 +669,7 @@ where
669669
if let Err(e) = sink_close_result {
670670
tracing::error!(%e, "fail to close sink");
671671
}
672-
tracing::info!(?quit_reason, "serve finished");
672+
tracing::debug!(?quit_reason, "serve finished");
673673
quit_reason
674674
});
675675
Ok(RunningService {

crates/rmcp/src/transport/sse_server.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async fn sse_handler(
9090
State(app): State<App>,
9191
) -> Result<Sse<impl Stream<Item = Result<Event, io::Error>>>, Response<String>> {
9292
let session = session_id();
93-
tracing::info!(%session, "sse connection");
93+
tracing::debug!(%session, "sse connection");
9494
use tokio_stream::{StreamExt, wrappers::ReceiverStream};
9595
use tokio_util::sync::PollSender;
9696
let (from_client_tx, from_client_rx) = tokio::sync::mpsc::channel(64);
@@ -232,7 +232,7 @@ impl SseServer {
232232
let ct = sse_server.config.ct.child_token();
233233
let server = axum::serve(listener, service).with_graceful_shutdown(async move {
234234
ct.cancelled().await;
235-
tracing::info!("sse server cancelled");
235+
tracing::debug!("sse server cancelled");
236236
});
237237
tokio::spawn(
238238
async move {

0 commit comments

Comments
 (0)