From 424634280616f2854dbf5520db2698bbf407d9b6 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 29 May 2023 17:26:32 -0700 Subject: [PATCH] lower log levels --- web3_proxy/src/frontend/status.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/frontend/status.rs b/web3_proxy/src/frontend/status.rs index 4ab2637b..fe3f0eb5 100644 --- a/web3_proxy/src/frontend/status.rs +++ b/web3_proxy/src/frontend/status.rs @@ -12,7 +12,7 @@ use axum::{ Extension, }; use axum_macros::debug_handler; -use log::debug; +use log::trace; use once_cell::sync::Lazy; use serde_json::json; use std::sync::Arc; @@ -46,6 +46,8 @@ pub async fn health( // TODO: _health doesn't need to be async, but _quick_cache_ttl needs an async function #[inline] async fn _health(app: Arc) -> (StatusCode, &'static str, Bytes) { + trace!("health is not cached"); + if app.balanced_rpcs.synced() { (StatusCode::OK, CONTENT_TYPE_PLAIN, HEALTH_OK.clone()) } else { @@ -78,6 +80,8 @@ pub async fn backups_needed( #[inline] async fn _backups_needed(app: Arc) -> (StatusCode, &'static str, Bytes) { + trace!("backups_needed is not cached"); + let code = { let consensus_rpcs = app .balanced_rpcs @@ -126,7 +130,7 @@ pub async fn status( // TODO: _status doesn't need to be async, but _quick_cache_ttl needs an async function #[inline] async fn _status(app: Arc) -> (StatusCode, &'static str, Bytes) { - debug!("status is not cached"); + trace!("status is not cached"); // TODO: what else should we include? uptime, cache hit rates, cpu load, memory used // TODO: the hostname is probably not going to change. only get once at the start?