Skip to content

add params warn logs #221

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

Merged
merged 3 commits into from
Feb 4, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions das_api/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub struct SearchAssets {
pub cursor: Option<String>,
#[serde(default)]
pub name: Option<String>,
#[serde(default)]
pub token_type: Option<TokenTypeClass>,
}

Expand Down
20 changes: 9 additions & 11 deletions das_api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,14 @@ impl Logger for MetricMiddleware {
true => "success",
false => "failure",
};
if success {
debug!(
"Call to '{}' {} took {:?}",
name,
stat,
started_at.elapsed()
);
} else {
warn!("Error calling method '{}'", name);
}

debug!(
"Call to '{}' {} took {:?}",
name,
stat,
started_at.elapsed()
);

safe_metric(|| {
let success = success.to_string();
statsd_time!("api_call", started_at.elapsed(), "method" => name, "success" => &success);
Expand All @@ -108,7 +106,7 @@ impl Logger for MetricMiddleware {
_kind: jsonrpsee::server::logger::MethodKind,
_transport: TransportProtocol,
) {
debug!("Call: {} {:?}", method_name, params);
warn!("Call: {} {:?}", method_name, params);
}

fn on_response(&self, result: &str, _started_at: Self::Instant, _transport: TransportProtocol) {
Expand Down