Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
benches/ | H | 03-May-2022 | - | 219 | 181 | |
examples/ | H | 03-May-2022 | - | 223 | 172 | |
src/ | H | 03-May-2022 | - | 570 | 270 | |
tests/ | H | 03-May-2022 | - | 256 | 215 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
.gitignore | H A D | 11-May-2016 | 26 | 4 | 3 | |
.travis.yml | H A D | 16-Nov-2019 | 531 | 21 | 20 | |
CHANGELOG.md | H A D | 17-Nov-2019 | 1.4 KiB | 69 | 41 | |
Cargo.lock | H A D | 01-Jan-1970 | 19.8 KiB | 451 | 398 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.8 KiB | 71 | 57 | |
Cargo.toml.orig-cargo | H A D | 17-Nov-2019 | 1.1 KiB | 35 | 31 | |
LICENSE-APACHE | H A D | 11-May-2016 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 11-May-2016 | 1 KiB | 26 | 22 | |
README.md | H A D | 01-Jul-2018 | 2.3 KiB | 67 | 51 | |
appveyor.yml | H A D | 01-Jul-2018 | 882 | 27 | 24 | |
rustfmt.toml | H A D | 11-May-2016 | 46 | 3 | 2 |
README.md
1[![Build status](https://travis-ci.org/cardoe/stderrlog-rs.svg?branch=master)](https://travis-ci.org/cardoe/stderrlog-rs) 2[![Build status](https://ci.appveyor.com/api/projects/status/no8slwtoy5va0w4g/branch/master?svg=true)](https://ci.appveyor.com/project/cardoe/stderrlog-rs/branch/master) 3[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/cardoe/stderrlog-rs.svg)](http://isitmaintained.com/project/cardoe/stderrlog-rs "Average time to resolve an issue") 4[![Percentage of issues still open](http://isitmaintained.com/badge/open/cardoe/stderrlog-rs.svg)](http://isitmaintained.com/project/cardoe/stderrlog-rs "Percentage of issues still open") 5[![Rust version]( https://img.shields.io/badge/rust-1.16+-blue.svg)]() 6[![Documentation](https://docs.rs/stderrlog/badge.svg)](https://docs.rs/stderrlog) 7[![Latest version](https://img.shields.io/crates/v/stderrlog.svg)](https://crates.io/crates/stderrlog) 8[![All downloads](https://img.shields.io/crates/d/stderrlog.svg)](https://crates.io/crates/stderrlog) 9[![Downloads of latest version](https://img.shields.io/crates/dv/stderrlog.svg)](https://crates.io/crates/stderrlog) 10 11Logger that aims to provide a simple case of 12[env_logger](https://crates.io/crates/env_logger) that just 13logs to `stderr` based on verbosity. 14 15## Documentation 16 17For a working example for [StructOpt](https::/crates.io/crates/structopt), 18[clap](https://crates.io/crates/clap), and 19[docopt](https://crates.io/crates/docopt) please see the 20[crate level documentation](https://docs.rs/stderrlog/*/stderrlog/). 21 22For example binaries showing how 23[module level logging](https://github.com/cardoe/stderrlog-rs/tree/master/examples/large-example) works, please see the `large-example` crate in `examples/`. 24 25## Supported Versions 26 27* `stderrlog` 0.4.x supports 28 1) Rust 1.16.0 and newer 29 2) `log` >= 0.4.1 30* `stderrlog` 0.3.x supports 31 1) Rust 1.16.0 and newer 32 2) `log` 0.3.x 33* `stderrlog` 0.2.x supports 34 1) Rust 1.13.0 and newer 35 2) `log` >= 0.3.0, < 0.3.9 36 37## Usage 38 39Add this to your `Cargo.toml`: 40 41```toml 42[dependencies] 43stderrlog = "0.4" 44``` 45 46and this to your crate root: 47 48```rust 49extern crate stderrlog; 50``` 51 52and this to your main(): 53 54```rust 55stderrlog::new().verbosity(args.flag_v).quiet(args.flag_q).init().unwrap(); 56``` 57 58where your args struct is defined as: 59 60```rust 61struct Args { 62 flag_v: usize, 63 flag_q: bool, 64 ... 65} 66``` 67