From 651244fbca143d19b15bc4a21006963e0ffd58f9 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 7 Jul 2023 14:14:03 -0700 Subject: [PATCH] lower log levels --- web3_proxy/src/frontend/users/authentication.rs | 3 +-- web3_proxy/src/frontend/users/payment_stripe.rs | 5 ++--- web3_proxy/tests/common/get_admin_deposits.rs | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/web3_proxy/src/frontend/users/authentication.rs b/web3_proxy/src/frontend/users/authentication.rs index 27e00777..54b33551 100644 --- a/web3_proxy/src/frontend/users/authentication.rs +++ b/web3_proxy/src/frontend/users/authentication.rs @@ -12,8 +12,7 @@ use axum::{ use axum_client_ip::InsecureClientIp; use axum_macros::debug_handler; use chrono::{TimeZone, Utc}; -use entities; -use entities::{balance, login, pending_login, referee, referrer, rpc_key, user}; +use entities::{self, balance, login, pending_login, referee, referrer, rpc_key, user}; use ethers::{prelude::Address, types::Bytes}; use hashbrown::HashMap; use http::StatusCode; diff --git a/web3_proxy/src/frontend/users/payment_stripe.rs b/web3_proxy/src/frontend/users/payment_stripe.rs index df3c1eee..4e6e31d2 100644 --- a/web3_proxy/src/frontend/users/payment_stripe.rs +++ b/web3_proxy/src/frontend/users/payment_stripe.rs @@ -19,7 +19,7 @@ use serde_json::json; use std::num::NonZeroU64; use std::sync::Arc; use stripe::Webhook; -use tracing::{debug, error, info, trace}; +use tracing::{debug, error, trace}; /// `GET /user/balance/stripe` -- Use a bearer token to get the user's balance and spend. /// @@ -96,8 +96,7 @@ pub async fn user_balance_stripe_post( _ => return Ok("Received irrelevant webhook".into_response()), }; - // TODO: lower log level when done testing - info!(?intent); + debug!(?intent); if intent.status.as_str() != "succeeded" { return Ok("Received Webhook".into_response()); diff --git a/web3_proxy/tests/common/get_admin_deposits.rs b/web3_proxy/tests/common/get_admin_deposits.rs index e835f889..96bf84c6 100644 --- a/web3_proxy/tests/common/get_admin_deposits.rs +++ b/web3_proxy/tests/common/get_admin_deposits.rs @@ -1,5 +1,5 @@ use crate::TestApp; -use tracing::info; +use tracing::trace; use web3_proxy::frontend::users::authentication::LoginPostResponse; /// Helper function to increase the balance of a user, from an admin @@ -10,7 +10,7 @@ pub async fn get_admin_deposits( user: &LoginPostResponse, ) -> serde_json::Value { let increase_balance_post_url = format!("{}user/deposits/admin", x.proxy_provider.url()); - info!("Get admin increase deposits"); + trace!("Get admin increase deposits"); // Login the user // Use the bearer token of admin to increase user balance let admin_balance_deposits = r @@ -19,12 +19,12 @@ pub async fn get_admin_deposits( .send() .await .unwrap(); - info!(?admin_balance_deposits, "http response"); + trace!(?admin_balance_deposits, "http response"); let admin_balance_deposits = admin_balance_deposits .json::() .await .unwrap(); - info!(?admin_balance_deposits, "json response"); + trace!(?admin_balance_deposits, "json response"); admin_balance_deposits }