lower log levels
This commit is contained in:
parent
3f76b08364
commit
1d05bc5e89
@ -773,7 +773,7 @@ impl Web3ProxyError {
|
||||
)
|
||||
}
|
||||
Self::RefererRequired => {
|
||||
warn!("referer required");
|
||||
debug!("referer required");
|
||||
(
|
||||
StatusCode::BAD_REQUEST,
|
||||
JsonRpcErrorData {
|
||||
@ -784,7 +784,7 @@ impl Web3ProxyError {
|
||||
)
|
||||
}
|
||||
Self::RefererNotAllowed(referer) => {
|
||||
warn!("referer not allowed referer={:?}", referer);
|
||||
debug!("referer not allowed referer={:?}", referer);
|
||||
(
|
||||
StatusCode::FORBIDDEN,
|
||||
JsonRpcErrorData {
|
||||
@ -898,7 +898,7 @@ impl Web3ProxyError {
|
||||
},
|
||||
),
|
||||
Self::UserAgentRequired => {
|
||||
warn!("UserAgentRequired");
|
||||
debug!("UserAgentRequired");
|
||||
(
|
||||
StatusCode::BAD_REQUEST,
|
||||
JsonRpcErrorData {
|
||||
@ -909,7 +909,7 @@ impl Web3ProxyError {
|
||||
)
|
||||
}
|
||||
Self::UserAgentNotAllowed(ua) => {
|
||||
warn!("UserAgentNotAllowed ua={}", ua);
|
||||
debug!("UserAgentNotAllowed ua={}", ua);
|
||||
(
|
||||
StatusCode::FORBIDDEN,
|
||||
JsonRpcErrorData {
|
||||
|
@ -314,7 +314,7 @@ pub async fn user_login_post(
|
||||
debug!("Refferal code is: {:?}", payload.referral_code);
|
||||
if let Some(referral_code) = payload.referral_code.as_ref() {
|
||||
// If it is not inside, also check in the database
|
||||
warn!("Using register referral code: {:?}", referral_code);
|
||||
trace!("Using register referral code: {:?}", referral_code);
|
||||
let user_referrer = referrer::Entity::find()
|
||||
.filter(referrer::Column::ReferralCode.eq(referral_code))
|
||||
.one(db_replica.as_ref())
|
||||
@ -345,7 +345,7 @@ pub async fn user_login_post(
|
||||
// First, optionally catch a referral code from the parameters if there is any
|
||||
if let Some(referral_code) = payload.referral_code.as_ref() {
|
||||
// If it is not inside, also check in the database
|
||||
warn!("Using referral code: {:?}", referral_code);
|
||||
trace!("Using referral code: {:?}", referral_code);
|
||||
let user_referrer = referrer::Entity::find()
|
||||
.filter(referrer::Column::ReferralCode.eq(referral_code))
|
||||
.one(db_replica.as_ref())
|
||||
|
@ -145,7 +145,7 @@ pub async fn get_subusers(
|
||||
.all(db_replica.as_ref())
|
||||
.await?;
|
||||
|
||||
warn!("Subusers are: {:?}", subusers);
|
||||
trace!("Subusers are: {:?}", subusers);
|
||||
|
||||
// Now return the list
|
||||
let response_json = json!({
|
||||
|
@ -146,7 +146,7 @@ pub async fn query_user_stats<'a>(
|
||||
.clone()
|
||||
.context("No influxdb bucket was provided")?; // "web3_proxy";
|
||||
|
||||
info!("Bucket is {:?}", bucket);
|
||||
trace!("Bucket is {:?}", bucket);
|
||||
let mut filter_chain_id = "".to_string();
|
||||
if chain_id != 0 {
|
||||
filter_chain_id = f!(r#"|> filter(fn: (r) => r["chain_id"] == "{chain_id}")"#);
|
||||
@ -154,14 +154,15 @@ pub async fn query_user_stats<'a>(
|
||||
|
||||
// Fetch and request for balance
|
||||
|
||||
info!(
|
||||
trace!(
|
||||
"Query start and stop are: {:?} {:?}",
|
||||
query_start, query_stop
|
||||
query_start,
|
||||
query_stop
|
||||
);
|
||||
// info!("Query column parameters are: {:?}", stats_column);
|
||||
info!("Query measurement is: {:?}", measurement);
|
||||
info!("Filters are: {:?}", filter_chain_id); // filter_field
|
||||
info!("window seconds are: {:?}", query_window_seconds);
|
||||
trace!("Query measurement is: {:?}", measurement);
|
||||
trace!("Filters are: {:?}", filter_chain_id); // filter_field
|
||||
trace!("window seconds are: {:?}", query_window_seconds);
|
||||
|
||||
let drop_method = match stat_response_type {
|
||||
StatType::Aggregated => f!(r#"|> drop(columns: ["method"])"#),
|
||||
@ -190,9 +191,9 @@ pub async fn query_user_stats<'a>(
|
||||
|> sort(columns: ["_time", "_measurement", "archive_needed", "chain_id", "error_response", "method", "rpc_secret_key_id"], desc: true)
|
||||
"#);
|
||||
|
||||
info!("Raw query to db is: {:?}", query);
|
||||
debug!("Raw query to db is: {:?}", query);
|
||||
let query = Query::new(query.to_string());
|
||||
info!("Query to db is: {:?}", query);
|
||||
trace!("Query to db is: {:?}", query);
|
||||
|
||||
// Make the query and collect all data
|
||||
let raw_influx_responses: Vec<FluxRecord> = influxdb_client
|
||||
|
Loading…
Reference in New Issue
Block a user