• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-May-2022-9368

src/H03-May-2022-593416

tests/H03-May-2022-5241

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

.gitignoreH A D22-Aug-201949 65

.travis.ymlH A D22-Aug-2019520 2522

CHANGELOG.mdH A D22-Aug-2019511 3118

Cargo.tomlH A D01-Jan-19701.4 KiB5645

Cargo.toml.orig-cargoH A D22-Aug-2019728 3629

LICENSE-APACHEH A D22-Aug-201910.6 KiB202169

LICENSE-MITH A D22-Aug-20191 KiB2622

MakefileH A D22-Aug-20191.7 KiB8162

README.mdH A D22-Aug-20192 KiB5842

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