Skip to content

Commit bc48014

Browse files
committed
chore(pegboard-runner): remove excess info logs in gateway
1 parent 8603145 commit bc48014

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

packages/core/pegboard-gateway/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl PegboardGateway {
155155
self.shared_state.send_message(request_id, message).await?;
156156

157157
// Wait for response
158-
tracing::info!("starting response handler task");
158+
tracing::debug!("starting response handler task");
159159
let response_start = loop {
160160
let Some(msg) = msg_rx.recv().await else {
161161
tracing::warn!("received no message response");
@@ -177,7 +177,7 @@ impl PegboardGateway {
177177
}
178178
}
179179
};
180-
tracing::info!("response handler task ended");
180+
tracing::debug!("response handler task ended");
181181

182182
// Build HTTP response
183183
let mut response_builder =
@@ -300,8 +300,7 @@ impl PegboardGateway {
300300
TunnelMessageData::Message(
301301
protocol::ToServerTunnelMessageKind::ToServerWebSocketClose(close),
302302
) => {
303-
tracing::info!(?close, "server closed websocket");
304-
// Exit the task - websocket will be closed when handle_websocket_inner exits
303+
tracing::debug!(?close, "server closed websocket");
305304
break;
306305
}
307306
TunnelMessageData::Timeout => {

packages/core/pegboard-gateway/src/shared_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl SharedState {
149149

150150
async fn receiver(&self, mut sub: Subscriber) {
151151
while let Ok(NextOutput::Message(msg)) = sub.next().await {
152-
tracing::info!(
152+
tracing::trace!(
153153
payload_len = msg.payload.len(),
154154
"received message from pubsub"
155155
);

packages/core/pegboard-runner/src/client_to_pubsub_task.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ async fn task_inner(
3030
conn: Arc<Conn>,
3131
mut ws_rx: WebSocketReceiver,
3232
) -> Result<()> {
33-
tracing::info!("starting WebSocket to pubsub forwarding task");
33+
tracing::debug!("starting WebSocket to pubsub forwarding task");
3434
while let Some(msg) = ws_rx.next().await {
3535
match msg {
3636
Result::Ok(WsMessage::Binary(data)) => {
37-
tracing::info!(
37+
tracing::trace!(
3838
data_len = data.len(),
3939
"received binary message from WebSocket"
4040
);
@@ -60,7 +60,7 @@ async fn task_inner(
6060
.context("failed to handle WebSocket message")?;
6161
}
6262
Result::Ok(WsMessage::Close(_)) => {
63-
tracing::info!(?conn.runner_id, "WebSocket closed");
63+
tracing::debug!(?conn.runner_id, "WebSocket closed");
6464
break;
6565
}
6666
Result::Ok(_) => {
@@ -72,7 +72,7 @@ async fn task_inner(
7272
}
7373
}
7474
}
75-
tracing::info!("WebSocket to pubsub forwarding task ended");
75+
tracing::debug!("WebSocket to pubsub forwarding task ended");
7676

7777
Ok(())
7878
}

packages/core/pegboard-runner/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
6969
let url_data =
7070
utils::UrlData::parse_url(url).context("failed to extract URL parameters")?;
7171

72-
tracing::info!(?path, "tunnel ws connection established");
72+
tracing::debug!(?path, "tunnel ws connection established");
7373

7474
// Accept WS
7575
let mut ws_rx = ws_handle
@@ -86,7 +86,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
8686
// that failures can be retried by the proxy.
8787
let topic =
8888
pegboard::pubsub_subjects::RunnerReceiverSubject::new(conn.runner_id).to_string();
89-
tracing::info!(%topic, "subscribing to runner receiver topic");
89+
tracing::debug!(%topic, "subscribing to runner receiver topic");
9090
let sub = ups
9191
.subscribe(&topic)
9292
.await
@@ -112,13 +112,13 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
112112
// Wait for either task to complete
113113
tokio::select! {
114114
_ = &mut pubsub_to_client => {
115-
tracing::info!("pubsub to WebSocket task completed");
115+
tracing::debug!("pubsub to WebSocket task completed");
116116
}
117117
_ = &mut client_to_pubsub => {
118-
tracing::info!("WebSocket to pubsub task completed");
118+
tracing::debug!("WebSocket to pubsub task completed");
119119
}
120120
_ = &mut ping => {
121-
tracing::info!("ping task completed");
121+
tracing::debug!("ping task completed");
122122
}
123123
}
124124

@@ -148,7 +148,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
148148
.ok();
149149

150150
// Clean up
151-
tracing::info!(?conn.runner_id, "connection closed");
151+
tracing::debug!(?conn.runner_id, "connection closed");
152152

153153
Ok(())
154154
}

packages/core/pegboard-runner/src/pubsub_to_client_task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub async fn task(ctx: StandaloneCtx, conn: Arc<Conn>, sub: Subscriber) {
2323

2424
async fn task_inner(ctx: StandaloneCtx, conn: Arc<Conn>, mut sub: Subscriber) -> Result<()> {
2525
while let Result::Ok(NextOutput::Message(ups_msg)) = sub.next().await {
26-
tracing::info!(
26+
tracing::debug!(
2727
payload_len = ups_msg.payload.len(),
2828
"received message from pubsub, forwarding to WebSocket"
2929
);

0 commit comments

Comments
 (0)