fix logs
This commit is contained in:
parent
bdf66387d6
commit
c52481c041
|
|
@ -111,18 +111,13 @@ impl Application for ZebradApp {
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("config is loaded before register_components");
|
.expect("config is loaded before register_components");
|
||||||
|
|
||||||
|
let default_filter = if command.verbose { "debug" } else { "info" };
|
||||||
let is_server = command
|
let is_server = command
|
||||||
.command
|
.command
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(ZebradCmd::is_server)
|
.map(ZebradCmd::is_server)
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
|
|
||||||
let default_filter = if is_server || command.verbose {
|
|
||||||
"info"
|
|
||||||
} else {
|
|
||||||
"warn"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Launch network endpoints for long-running commands
|
// Launch network endpoints for long-running commands
|
||||||
if is_server {
|
if is_server {
|
||||||
let filter = cfg_ref.tracing.filter.as_deref().unwrap_or(default_filter);
|
let filter = cfg_ref.tracing.filter.as_deref().unwrap_or(default_filter);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue