#clap #verbosity #flag #structopt #log

clap-verbosity-flag

Easily add a --verbose flag to CLIs using Structopt

10 releases (2 stable)

Uses new Rust 2021

1.0.1 Jun 13, 2022
1.0.0 Feb 9, 2022
0.4.1 Jan 27, 2022
0.4.0 Dec 31, 2021
0.1.0 May 29, 2018

#20 in Command-line interface

Download history 1382/week @ 2022-03-11 2873/week @ 2022-03-18 1733/week @ 2022-03-25 2468/week @ 2022-04-01 2542/week @ 2022-04-08 2682/week @ 2022-04-15 2464/week @ 2022-04-22 4105/week @ 2022-04-29 3542/week @ 2022-05-06 2543/week @ 2022-05-13 2500/week @ 2022-05-20 2982/week @ 2022-05-27 2691/week @ 2022-06-03 2915/week @ 2022-06-10 3206/week @ 2022-06-17 2398/week @ 2022-06-24

11,523 downloads per month
Used in 97 crates (49 directly)

MIT/Apache

12KB
123 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 {
    #[clap(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

~2–2.6MB
~50K SLoC