From b591b362fe2c532f2f3b3be2135f3ad7afaa6878 Mon Sep 17 00:00:00 2001 From: Nicolas Villanueva Date: Wed, 3 Jul 2024 16:06:29 +0100 Subject: [PATCH] fix: hide multivm log warnings and traces (#310) * fix: remove multivm logs * remove println * fix: lint --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 7 ++----- src/observability.rs | 5 ++++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0068b28c..dd183253 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1751,7 +1751,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_test_node" -version = "0.1.0-alpha.24" +version = "0.1.0-alpha.25" dependencies = [ "anyhow", "bigdecimal", diff --git a/Cargo.toml b/Cargo.toml index 57a3c00e..aa8b8317 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "era_test_node" -version = "0.1.0-alpha.24" +version = "0.1.0-alpha.25" edition = "2018" authors = ["The Matter Labs Team "] homepage = "https://zksync.io/" diff --git a/src/main.rs b/src/main.rs index 9bf692c2..ac99215d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -203,11 +203,8 @@ async fn main() -> anyhow::Result<()> { let log_file = File::create(config.log.file_path)?; // Initialize the tracing subscriber - let observability = Observability::init( - vec!["era_test_node".into(), "multivm".into()], - log_level_filter, - log_file, - )?; + let observability = + Observability::init(vec!["era_test_node".into()], log_level_filter, log_file)?; // Use `Command::Run` as default. let command = opt.command.as_ref().unwrap_or(&Command::Run); diff --git a/src/observability.rs b/src/observability.rs index 7fdb03ba..2e1b79e3 100644 --- a/src/observability.rs +++ b/src/observability.rs @@ -58,7 +58,10 @@ impl Observability { log_file: File, ) -> Result { let joined_filter = binary_names - .join(format!("={},", log_level_filter.to_string().to_lowercase()).as_str()); + .iter() + .map(|x| format!("{}={}", x, log_level_filter.to_string().to_lowercase())) + .collect::>() + .join(","); let filter = Self::parse_filter(&joined_filter)?; let (filter, reload_handle) = reload::Layer::new(filter);