lower log levels
This commit is contained in:
parent
c1eba556a5
commit
4246342806
@ -12,7 +12,7 @@ use axum::{
|
|||||||
Extension,
|
Extension,
|
||||||
};
|
};
|
||||||
use axum_macros::debug_handler;
|
use axum_macros::debug_handler;
|
||||||
use log::debug;
|
use log::trace;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::sync::Arc;
|
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
|
// TODO: _health doesn't need to be async, but _quick_cache_ttl needs an async function
|
||||||
#[inline]
|
#[inline]
|
||||||
async fn _health(app: Arc<Web3ProxyApp>) -> (StatusCode, &'static str, Bytes) {
|
async fn _health(app: Arc<Web3ProxyApp>) -> (StatusCode, &'static str, Bytes) {
|
||||||
|
trace!("health is not cached");
|
||||||
|
|
||||||
if app.balanced_rpcs.synced() {
|
if app.balanced_rpcs.synced() {
|
||||||
(StatusCode::OK, CONTENT_TYPE_PLAIN, HEALTH_OK.clone())
|
(StatusCode::OK, CONTENT_TYPE_PLAIN, HEALTH_OK.clone())
|
||||||
} else {
|
} else {
|
||||||
@ -78,6 +80,8 @@ pub async fn backups_needed(
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
async fn _backups_needed(app: Arc<Web3ProxyApp>) -> (StatusCode, &'static str, Bytes) {
|
async fn _backups_needed(app: Arc<Web3ProxyApp>) -> (StatusCode, &'static str, Bytes) {
|
||||||
|
trace!("backups_needed is not cached");
|
||||||
|
|
||||||
let code = {
|
let code = {
|
||||||
let consensus_rpcs = app
|
let consensus_rpcs = app
|
||||||
.balanced_rpcs
|
.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
|
// TODO: _status doesn't need to be async, but _quick_cache_ttl needs an async function
|
||||||
#[inline]
|
#[inline]
|
||||||
async fn _status(app: Arc<Web3ProxyApp>) -> (StatusCode, &'static str, Bytes) {
|
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: 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?
|
// TODO: the hostname is probably not going to change. only get once at the start?
|
||||||
|
Loading…
Reference in New Issue
Block a user