Crates.io | buche |
lib.rs | buche |
version | 0.7.0 |
source | src |
created_at | 2023-01-10 18:07:32.408965 |
updated_at | 2023-01-10 18:13:53.242688 |
description | Logger that logs to stderr based on verbosity specified |
homepage | https://github.com/delehef/buche |
repository | https://github.com/delehef/buche |
max_upload_size | |
id | 755734 |
size | 102,073 |
A fork of stderrlog, a logger that
aims to provide a simple case of
env_logger that just logs to stderr
based on verbosity.
For a working example for StructOpt, clap, and docopt please see the crate level documentation.
For example binaries showing how
module level logging works, please see the large-example
crate in examples/
.
Add this to your Cargo.toml
:
[dependencies]
buche = "0.6"
and this to your main():
buche::new().verbosity(args.flag_v).quiet(args.flag_q).init().unwrap();
where your args struct is defined as:
struct Args {
flag_v: usize,
flag_q: bool,
...
}