Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
examples/ | H | 03-May-2022 | - | 93 | 68 | |
src/ | H | 03-May-2022 | - | 593 | 416 | |
tests/ | H | 03-May-2022 | - | 52 | 41 | |
.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 | 22-Aug-2019 | 49 | 6 | 5 | |
.travis.yml | H A D | 22-Aug-2019 | 520 | 25 | 22 | |
CHANGELOG.md | H A D | 22-Aug-2019 | 511 | 31 | 18 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.4 KiB | 56 | 45 | |
Cargo.toml.orig-cargo | H A D | 22-Aug-2019 | 728 | 36 | 29 | |
LICENSE-APACHE | H A D | 22-Aug-2019 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 22-Aug-2019 | 1 KiB | 26 | 22 | |
Makefile | H A D | 22-Aug-2019 | 1.7 KiB | 81 | 62 | |
README.md | H A D | 22-Aug-2019 | 2 KiB | 58 | 42 |
README.md
1<p align="center"> 2 3 <a href="https://github.com/slog-rs/slog"> 4 <img src="https://cdn.rawgit.com/slog-rs/misc/master/media/slog.svg" alt="slog-rs logo"> 5 </a> 6 <br> 7 8 <a href="https://travis-ci.org/slog-rs/envlogger"> 9 <img src="https://img.shields.io/travis/slog-rs/envlogger/master.svg?style=flat-square" alt="Travis CI Build Status"> 10 </a> 11 <a href="https://crates.io/crates/slog-envlogger"> 12 <img src="http://meritbadge.herokuapp.com/slog-envlogger?style=flat-square" alt="crates.io"> 13 </a> 14 <a href="https://gitter.im/slog-rs/slog"> 15 <img src="https://img.shields.io/gitter/room/slog-rs/slog.svg" alt="slog-rs Gitter Chat"> 16 </a> 17 <br> 18 <strong><a href="https://docs.rs/slog-envlogger/">Documentation</a></strong> 19</p> 20 21# `slog-envlogger` - Port of `env_logger` as a [`slog-rs`][slog-rs] drain 22 23`env_logger` is a de facto standard Rust logger implementation, which allows 24controlling logging to `stderr` via the `RUST_LOG` environment variable. 25 26This is a fork of `env_logger` that makes it work as a `slog-rs` drain. 27 28Notable changes: 29 30* Support for `slog-stdlog` to provide support for legacy `info!(...)` like 31 statements. 32* `envlogger` does not do any formatting anymore: `slog-envlogger` can be composed 33 with any other `slog-rs` drains, so there's no point for it to provide it's 34 own formatting. You can now output to a file, use JSON, have color output 35 or any other future that `slog` ecosystem provides, controlling it via 36 `RUST_LOG` environment var. 37 38### Status & news 39 40**Warning**: Documentation has been been left mostly untouched, which means some 41places of it might be confusing. 42 43### How to use 44 45See `examples` directory. 46 47The simplest way to convert existing project to use `slog-rs`+`slog-envlogger` 48is shown in 49[`simple` example](examples/simple.rs) 50 51For more proper (and powerful) version see 52[`proper` example](examples/proper.rs) 53 54Using `slog-stdlog` scopes you can make parts of the code log additional information (see [`scopes` example][scopes]): 55 56[scopes]: examples/scopes.rs 57[slog-rs]: //github.com/slog-rs/slog 58