From 334b1c21b3c6f5d5a4c542ea46a2f25d4bfe01bd Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 8 Jun 2023 11:30:48 -0700 Subject: [PATCH] improve logs --- web3_proxy/src/frontend/users/subuser.rs | 2 +- web3_proxy/src/stats/influxdb_queries.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/frontend/users/subuser.rs b/web3_proxy/src/frontend/users/subuser.rs index 81597444..2137ede3 100644 --- a/web3_proxy/src/frontend/users/subuser.rs +++ b/web3_proxy/src/frontend/users/subuser.rs @@ -145,7 +145,7 @@ pub async fn get_subusers( .all(db_replica.as_ref()) .await?; - trace!("Subusers are: {:?}", subusers); + trace!("Subusers are: {}", json!(subusers)); // Now return the list let response_json = json!({ diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index 370f2523..7df6ccae 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -20,7 +20,7 @@ use fstrings::{f, format_args_f}; use hashbrown::HashMap; use influxdb2::api::query::FluxRecord; use influxdb2::models::Query; -use log::{error, info, warn}; +use log::{debug, error, info, trace, warn}; use migration::sea_orm::ColumnTrait; use migration::sea_orm::EntityTrait; use migration::sea_orm::QueryFilter; @@ -191,7 +191,7 @@ pub async fn query_user_stats<'a>( |> sort(columns: ["_time", "_measurement", "archive_needed", "chain_id", "error_response", "method", "rpc_secret_key_id"], desc: true) "#); - debug!("Raw query to db is: {:?}", query); + debug!("Raw query to db is: {:#?}", query); let query = Query::new(query.to_string()); trace!("Query to db is: {:?}", query);