Skip to content

Commit

Permalink
chore: demote RPC logs by one level (#4818)
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs authored Sep 30, 2024
1 parent b8e830a commit 036a489
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rpc/log_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ where
let service = self.service.clone();

async move {
// Avoid performance overhead if INFO level is not enabled.
if !tracing::enabled!(tracing::Level::INFO) {
// Avoid performance overhead if DEBUG level is not enabled.
if !tracing::enabled!(tracing::Level::DEBUG) {
return service.call(req).await;
}

Expand All @@ -51,7 +51,7 @@ where
let id = req.id();
let id = create_unique_id(id, start_time);

tracing::debug!(
tracing::trace!(
"RPC#{id}: {method_name}. Params: {params}",
params = req.params().as_str().unwrap_or("[]")
);
Expand All @@ -62,7 +62,7 @@ where
let result = resp.as_error_code().map_or(Cow::Borrowed("OK"), |code| {
Cow::Owned(format!("ERR({code})"))
});
tracing::info!("RPC#{id} {result}: {method_name}. Took {elapsed:?}");
tracing::debug!("RPC#{id} {result}: {method_name}. Took {elapsed:?}");

resp
}
Expand Down

0 comments on commit 036a489

Please sign in to comment.