Fix log level setting in runtime
Do not immediately set log level to Level::Info if argument is present, but check value, too.
This commit is contained in:
parent
90eb83a538
commit
c0607ba2e2
1 changed files with 5 additions and 5 deletions
|
@ -231,13 +231,13 @@ fn aggregate_global_loglevel(matches: &ArgMatches, config: Option<&Value>) -> Re
|
||||||
return Ok(Some(Level::Debug))
|
return Ok(Some(Level::Debug))
|
||||||
}
|
}
|
||||||
|
|
||||||
if matches.is_present(Runtime::arg_verbosity_name()) {
|
|
||||||
return Ok(Some(Level::Info))
|
|
||||||
}
|
|
||||||
|
|
||||||
match matches.value_of(Runtime::arg_verbosity_name()) {
|
match matches.value_of(Runtime::arg_verbosity_name()) {
|
||||||
Some(v) => match_log_level_str(v).map(Some),
|
Some(v) => match_log_level_str(v).map(Some),
|
||||||
None => Ok(None),
|
None => if matches.is_present(Runtime::arg_verbosity_name()) {
|
||||||
|
Ok(Some(Level::Info))
|
||||||
|
} else {
|
||||||
|
Ok(None)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue