debug to debug level

This commit is contained in:
Bryan Stitt 2022-05-20 03:35:45 +00:00
parent b4afb89102
commit 212650290f
3 changed files with 5 additions and 5 deletions

@ -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"

@ -111,6 +111,7 @@ impl Web3ProxyApp {
self: Arc<Web3ProxyApp>,
request: JsonRpcRequestEnum,
) -> anyhow::Result<impl warp::Reply> {
// 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))

@ -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();