lower log levels

This commit is contained in:
Bryan Stitt 2023-05-29 17:26:32 -07:00
parent c1eba556a5
commit 4246342806

@ -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<Web3ProxyApp>) -> (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<Web3ProxyApp>) -> (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<Web3ProxyApp>) -> (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?