diff --git a/src/logging.rs b/src/logging.rs index 00d6ad3..9ddb2aa 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -100,6 +100,8 @@ const fn get_log_level(args: &Cli) -> LevelFilter { LevelFilter::Trace } else if args.verbose { LevelFilter::Info + } else if args.quiet { + LevelFilter::Error } else { LevelFilter::Warn } diff --git a/src/parse.rs b/src/parse.rs index a8efb35..d091143 100644 --- a/src/parse.rs +++ b/src/parse.rs @@ -20,6 +20,8 @@ pub struct Cli { pub keep: bool, #[arg(long, short, help = "Show info log messages")] pub verbose: bool, + #[arg(long, short, help = "Hide warning messages")] + pub quiet: bool, #[arg(long, short, help = "Show trace log messages")] pub trace: bool, #[arg(required = true)] @@ -41,6 +43,7 @@ impl Cli { print: false, keep: false, verbose: false, + quiet: false, trace: false, files: Vec::::new(), }