From 212650290f94fe4651acde1a06b0e45ae449e2c8 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 20 May 2022 03:35:45 +0000 Subject: [PATCH] debug to debug level --- docker-compose.common.yml | 2 +- web3-proxy/src/app.rs | 2 ++ web3-proxy/src/main.rs | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.common.yml b/docker-compose.common.yml index b3178c19..4c26fa0e 100644 --- a/docker-compose.common.yml +++ b/docker-compose.common.yml @@ -4,4 +4,4 @@ services: restart: unless-stopped command: --config /config.toml --workers 8 environment: - RUST_LOG: "web3_proxy=trace" + RUST_LOG: "web3_proxy=debug" diff --git a/web3-proxy/src/app.rs b/web3-proxy/src/app.rs index be7c8e4e..dcb12945 100644 --- a/web3-proxy/src/app.rs +++ b/web3-proxy/src/app.rs @@ -111,6 +111,7 @@ impl Web3ProxyApp { self: Arc, request: JsonRpcRequestEnum, ) -> anyhow::Result { + // TODO: i don't always see this in the logs. why? debug!("Received request: {:?}", request); let response = match request { @@ -122,6 +123,7 @@ impl Web3ProxyApp { } }; + // TODO: i don't always see this in the logs. why? debug!("Forwarding response: {:?}", response); Ok(warp::reply::json(&response)) diff --git a/web3-proxy/src/main.rs b/web3-proxy/src/main.rs index de69c9c0..e9cb74b6 100644 --- a/web3-proxy/src/main.rs +++ b/web3-proxy/src/main.rs @@ -23,12 +23,10 @@ use crate::config::{CliConfig, RpcConfig}; fn main() -> anyhow::Result<()> { // TODO: is there a better way to do this? - if env::var("RUST_LOG").is_err() { - env::set_var("RUST_LOG", "web3_proxy=debug"); - } + // TODO: what should the default log level be? // install global collector configured based on RUST_LOG env var. - tracing_subscriber::fmt().init(); + tracing_subscriber::fmt().compact().init(); // console_subscriber::init(); fdlimit::raise_fd_limit();