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