#clap #verbosity #flag #structopt #log #logging

clap-verbosity-flag

Easily add a --verbose flag to CLIs using Structopt

11 releases (3 stable)

2.0.0 Sep 28, 2022
1.0.1 Jun 13, 2022
1.0.0 Feb 9, 2022
0.4.1 Jan 27, 2022
0.1.0 May 29, 2018

#26 in Command-line interface

Download history 3667/week @ 2022-10-18 3376/week @ 2022-10-25 4696/week @ 2022-11-01 4689/week @ 2022-11-08 5223/week @ 2022-11-15 5277/week @ 2022-11-22 5345/week @ 2022-11-29 5823/week @ 2022-12-06 5059/week @ 2022-12-13 3363/week @ 2022-12-20 3341/week @ 2022-12-27 5325/week @ 2023-01-03 6159/week @ 2023-01-10 8298/week @ 2023-01-17 12009/week @ 2023-01-24 10007/week @ 2023-01-31

37,792 downloads per month
Used in 140 crates (92 directly)

MIT/Apache

11KB
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

~1.4–1.9MB
~36K SLoC