17 releases (9 stable)

new 2.2.1 Jul 25, 2024
2.2.0 Feb 14, 2024
2.1.2 Jan 16, 2024
2.1.1 Dec 15, 2023
0.1.0 May 29, 2018

#14 in Command-line interface

Download history 22747/week @ 2024-04-04 23726/week @ 2024-04-11 22235/week @ 2024-04-18 23156/week @ 2024-04-25 21657/week @ 2024-05-02 21146/week @ 2024-05-09 24562/week @ 2024-05-16 23373/week @ 2024-05-23 29032/week @ 2024-05-30 27324/week @ 2024-06-06 30270/week @ 2024-06-13 27783/week @ 2024-06-20 26303/week @ 2024-06-27 27148/week @ 2024-07-04 28109/week @ 2024-07-11 25322/week @ 2024-07-18

111,392 downloads per month
Used in 334 crates (264 directly)

MIT/Apache

16KB
135 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