Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: downgrade logs from error/warn -> debug #1343

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/transport/src/ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ impl WsTransportClientBuilder {
Ok(uri) => {
// Absolute URI.
target = uri.try_into().map_err(|e| {
tracing::error!(target: LOG_TARGET, "Redirection failed: {:?}", e);
tracing::debug!(target: LOG_TARGET, "Redirection failed: {:?}", e);
e
})?;

Expand Down
6 changes: 3 additions & 3 deletions core/src/client/async_client/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub(crate) fn process_batch_response(
let batch_state = match manager.complete_pending_batch(range.clone()) {
Some(state) => state,
None => {
tracing::warn!(target: LOG_TARGET, "Received unknown batch response");
tracing::debug!(target: LOG_TARGET, "Received unknown batch response");
return Err(InvalidRequestId::NotPendingRequest(format!("{:?}", range)));
}
};
Expand Down Expand Up @@ -110,7 +110,7 @@ pub(crate) fn process_subscription_response(
Ok(_) => None,
Err(TrySubscriptionSendError::Closed) => Some(sub_id),
Err(TrySubscriptionSendError::TooSlow(m)) => {
tracing::error!(target: LOG_TARGET, "Subscription {{method={}, sub_id={:?}}} couldn't keep up with server; failed to send {m}", response.method, sub_id);
tracing::debug!(target: LOG_TARGET, "Subscription {{method={}, sub_id={:?}}} couldn't keep up with server; failed to send {m}", response.method, sub_id);
Some(sub_id)
}
},
Expand Down Expand Up @@ -156,7 +156,7 @@ pub(crate) fn process_notification(manager: &mut RequestManager, notif: Notifica
let _ = manager.remove_notification_handler(&notif.method);
}
Err(TrySubscriptionSendError::TooSlow(m)) => {
tracing::error!(target: LOG_TARGET, "Notification `{}` couldn't keep up with server; failed to send {m}", notif.method);
tracing::debug!(target: LOG_TARGET, "Notification `{}` couldn't keep up with server; failed to send {m}", notif.method);
let _ = manager.remove_notification_handler(&notif.method);
}
},
Expand Down
12 changes: 6 additions & 6 deletions core/src/client/async_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ async fn handle_frontend_messages<S: TransportSenderT>(
match message {
FrontToBack::Batch(batch) => {
if let Err(send_back) = manager.lock().insert_pending_batch(batch.ids.clone(), batch.send_back) {
tracing::warn!(target: LOG_TARGET, "Batch request already pending: {:?}", batch.ids);
tracing::debug!(target: LOG_TARGET, "Batch request already pending: {:?}", batch.ids);
let _ = send_back.send(Err(InvalidRequestId::Occupied(format!("{:?}", batch.ids)).into()));
return Ok(());
}
Expand All @@ -851,7 +851,7 @@ async fn handle_frontend_messages<S: TransportSenderT>(
// User called `request` on the front-end
FrontToBack::Request(request) => {
if let Err(send_back) = manager.lock().insert_pending_call(request.id.clone(), request.send_back) {
tracing::warn!(target: LOG_TARGET, "Denied duplicate method call");
tracing::debug!(target: LOG_TARGET, "Denied duplicate method call");

if let Some(s) = send_back {
let _ = s.send(Err(InvalidRequestId::Occupied(request.id.to_string()).into()));
Expand All @@ -869,7 +869,7 @@ async fn handle_frontend_messages<S: TransportSenderT>(
sub.send_back,
sub.unsubscribe_method,
) {
tracing::warn!(target: LOG_TARGET, "Denied duplicate subscription");
tracing::debug!(target: LOG_TARGET, "Denied duplicate subscription");

let _ = send_back.send(Err(InvalidRequestId::Occupied(format!(
"sub_id={}:req_id={}",
Expand Down Expand Up @@ -965,13 +965,13 @@ where
if let Err(e) =
handle_frontend_messages(msg, &manager, &mut sender, max_buffer_capacity_per_subscription).await
{
tracing::error!(target: LOG_TARGET, "ws send failed: {e}");
tracing::debug!(target: LOG_TARGET, "ws send failed: {e}");
break Err(Error::Transport(e.into()));
}
}
_ = ping_interval.next() => {
if let Err(err) = sender.send_ping().await {
tracing::error!(target: LOG_TARGET, "Send ws ping failed: {err}");
tracing::debug!(target: LOG_TARGET, "Send ws ping failed: {err}");
break Err(Error::Transport(err.into()));
}
}
Expand Down Expand Up @@ -1040,7 +1040,7 @@ where
pending_unsubscribes.push(to_send_task.send(msg));
}
Err(e) => {
tracing::error!(target: LOG_TARGET, "Failed to read message: {e}");
tracing::debug!(target: LOG_TARGET, "Failed to read message: {e}");
break Err(e);
}
Ok(None) => (),
Expand Down