This commit is contained in:
Alfredo Garcia 2020-08-06 17:30:55 -03:00 committed by teor
parent bdf66387d6
commit c52481c041
1 changed files with 1 additions and 6 deletions

View File

@ -111,18 +111,13 @@ impl Application for ZebradApp {
.as_ref()
.expect("config is loaded before register_components");
let default_filter = if command.verbose { "debug" } else { "info" };
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);