From 3e9c6f054b2560c6bd3711d0cfdb7c568ef64d94 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Thu, 6 Aug 2020 11:23:00 -0700 Subject: [PATCH] fix log level default for server commands (#840) * fix log level default for server commands * remove dbg --- zebrad/src/application.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zebrad/src/application.rs b/zebrad/src/application.rs index 27814801..3f026a97 100644 --- a/zebrad/src/application.rs +++ b/zebrad/src/application.rs @@ -111,13 +111,18 @@ impl Application for ZebradApp { .as_ref() .expect("config is loaded before register_components"); - let default_filter = if command.verbose { "info" } else { "warn" }; let is_server = command .command .as_ref() .map(ZebradCmd::is_server) .unwrap_or(false); + let default_filter = if is_server || command.verbose { + "info" + } else { + "warn" + }; + // Launch network endpoints for long-running commands if is_server { let filter = cfg_ref.tracing.filter.as_deref().unwrap_or(default_filter);