Debian Codegraph @

third_party/rust/clap-verbosity-flag/README.md

raw
1 # clap-verbosity-flag for `log`
2
3 [![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation]
4 ![License](https://img.shields.io/crates/l/clap-verbosity-flag.svg)
5 [![crates.io](https://img.shields.io/crates/v/clap-verbosity-flag.svg)][Crates.io]
6
7 [Crates.io]: https://crates.io/crates/clap-verbosity-flag
8 [Documentation]: https://docs.rs/clap-verbosity-flag/
9
10 Easily add a `--verbose` flag to CLIs using Clap
11
12 ## Examples
13
14 ```rust
15 use clap::Parser;
16
17 // ...
18 #[derive(Debug, Parser)]
19 struct Cli {
20 #[command(flatten)]
21 verbose: clap_verbosity_flag::Verbosity,
22 }
23 ```
24
25 By default, it'll only report errors.
26 - `-q` silences output
27 - `-v` show warnings
28 - `-vv` show info
29 - `-vvv` show debug
30 - `-vvvv` show trace
31
32 ## License
33
34 Licensed under either of
35
36 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
37 * MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
38
39 at your option.
40
41 ### Contribution
42
43 Unless you explicitly state otherwise, any contribution intentionally
44 submitted for inclusion in the work by you, as defined in the Apache-2.0
45 license, shall be dual licensed as above, without any additional terms or
46 conditions.