diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/main.rs b/src/main.rs index 5e22dc7..94c0f71 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,14 +46,8 @@ pub mod watch; async fn main() -> Result<()> { let args = cli::CliArgs::parse(); - let verbosity: u8 = if args.verbosity == u8::MAX { - // the user did not specify a verbosity - 2 // log::Level::Warn - } else { - assert!(args.verbosity > 0); - - args.verbosity + 2 // log::Level::Warn - }; + // The default verbosity is 1 (Warn) + let verbosity: u8 = args.verbosity + 1; stderrlog::new() .module(module_path!()) @@ -68,12 +62,11 @@ async fn main() -> Result<()> { info!("Using verbosity level: '{} ({})'", verbosity, { match verbosity { - 0 => "Off", - 1 => "Error", - 2 => "Warn", - 3 => "Info", - 4 => "Debug", - 5.. => "Trace", + 0 => "Error", + 1 => "Warn", + 2 => "Info", + 3 => "Debug", + 4.. => "Trace", } }); |