16 releases (8 stable)

2.2.0 Feb 14, 2024
2.1.1 Dec 15, 2023
2.1.0 Oct 23, 2023
2.0.1 Mar 31, 2023
0.1.0 May 29, 2018

#14 in Command-line interface

Download history 17300/week @ 2024-01-22 18214/week @ 2024-01-29 19651/week @ 2024-02-05 17885/week @ 2024-02-12 17895/week @ 2024-02-19 18819/week @ 2024-02-26 18701/week @ 2024-03-04 18966/week @ 2024-03-11 21433/week @ 2024-03-18 23555/week @ 2024-03-25 23791/week @ 2024-04-01 21813/week @ 2024-04-08 24365/week @ 2024-04-15 22760/week @ 2024-04-22 21293/week @ 2024-04-29 21052/week @ 2024-05-06

90,684 downloads per month
Used in 310 crates (242 directly)

MIT/Apache

12KB
130 lines

clap-verbosity-flag for log

Documentation License crates.io

Easily add a --verbose flag to CLIs using Clap

Examples

use clap::Parser;

// ...
#[derive(Debug, Parser)]
struct Cli {
    #[command(flatten)]
    verbose: clap_verbosity_flag::Verbosity,
}

By default, it'll only report errors.

  • -q silences output
  • -v show warnings
  • -vv show info
  • -vvv show debug
  • -vvvv show trace

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.3–1.9MB
~36K SLoC