From 9118117fe7af229cd588d63f284c6cb4c6404476 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 18 Apr 2023 20:50:35 -0700 Subject: [PATCH] tell ethers to shut up --- Dockerfile | 2 +- README.md | 2 +- docker-compose.common.yml | 2 +- web3_proxy/src/bin/web3_proxy_cli/main.rs | 1 + web3_proxy/src/bin/web3_proxy_cli/proxyd.rs | 5 ++++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43ecd6cc..c657919e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,6 +57,6 @@ ENTRYPOINT ["web3_proxy_cli"] CMD [ "--config", "/web3-proxy.toml", "proxyd" ] # TODO: lower log level when done with prototyping -ENV RUST_LOG "warn,web3_proxy=debug,web3_proxy_cli=debug" +ENV RUST_LOG "warn,ethers_providers::rpc=off,web3_proxy=debug,web3_proxy_cli=debug" COPY --from=builder /usr/local/bin/* /usr/local/bin/ diff --git a/README.md b/README.md index f53c6244..0c1931e5 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Be sure to use `--no-inline` or perf will be VERY slow Developers can run the proxy under gdb for advanced debugging: - cargo build --release && RUST_LOG=web3_proxy=debug rust-gdb --args target/debug/web3_proxy --listen-port 7503 --rpc-config-path ./config/production-eth.toml + cargo build --release && RUST_LOG=info,web3_proxy=debug,ethers_providers::rpc=off rust-gdb --args target/debug/web3_proxy --listen-port 7503 --rpc-config-path ./config/production-eth.toml TODO: also enable debug symbols in the release build by modifying the root Cargo.toml diff --git a/docker-compose.common.yml b/docker-compose.common.yml index e6164994..9bf18cef 100644 --- a/docker-compose.common.yml +++ b/docker-compose.common.yml @@ -9,7 +9,7 @@ services: stop_signal: SIGINT environment: #RUST_LOG: "info,web3_proxy=debug" - RUST_LOG: info + RUST_LOG: info,ethers_providers::rpc=off volatile_redis: image: redis:6.0-alpine diff --git a/web3_proxy/src/bin/web3_proxy_cli/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs index 06d8c22f..e9f4022f 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/main.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/main.rs @@ -132,6 +132,7 @@ fn main() -> anyhow::Result<()> { "info", "ethers=debug", "ethers_providers=debug", + "ethers_providers::rpc=off", "redis_rate_limit=debug", "web3_proxy=trace", "web3_proxy_cli=trace", diff --git a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs index 821f90c4..c70d1816 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs @@ -341,7 +341,10 @@ mod tests { // TODO: how should we handle logs in this? // TODO: option for super verbose logs - std::env::set_var("RUST_LOG", "info,web3_proxy=debug"); + std::env::set_var( + "RUST_LOG", + "info,ethers_providers::rpc=off,web3_proxy=debug", + ); let _ = env_logger::builder().is_test(true).try_init();