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 9249/week @ 2023-12-23 13089/week @ 2023-12-30 16933/week @ 2024-01-06 17059/week @ 2024-01-13 16886/week @ 2024-01-20 18014/week @ 2024-01-27 19957/week @ 2024-02-03 17599/week @ 2024-02-10 18763/week @ 2024-02-17 18238/week @ 2024-02-24 18506/week @ 2024-03-02 19598/week @ 2024-03-09 20553/week @ 2024-03-16 23780/week @ 2024-03-23 23669/week @ 2024-03-30 18854/week @ 2024-04-06

89,701 downloads per month
Used in 303 crates (235 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