generated from PlexSheep/baserepo
fix(cli): loglevel values were not calculated correctly
cargo devel CI / cargo CI (push) Successful in 2m10s
Details
cargo devel CI / cargo CI (push) Successful in 2m10s
Details
This commit is contained in:
parent
c6afa063ef
commit
c81952002f
|
@ -140,13 +140,21 @@ impl VerbosityLevel {
|
||||||
/// get the [Level] for that VerbosityLevel
|
/// get the [Level] for that VerbosityLevel
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn level(&self) -> Level {
|
pub fn level(&self) -> Level {
|
||||||
match self.value() {
|
let v = self.value();
|
||||||
|
match v {
|
||||||
0 => Level::ERROR,
|
0 => Level::ERROR,
|
||||||
1 => Level::WARN,
|
1 => Level::WARN,
|
||||||
2 => Level::INFO,
|
2 => Level::INFO,
|
||||||
3 => Level::DEBUG,
|
3 => Level::DEBUG,
|
||||||
4 => Level::TRACE,
|
4 => Level::TRACE,
|
||||||
_ => Level::ERROR,
|
_ => {
|
||||||
|
if v > 4 {
|
||||||
|
Level::TRACE
|
||||||
|
} else {
|
||||||
|
/* v < 0 */
|
||||||
|
Level::ERROR
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue