1 unstable release

Uses old Rust 2015

0.1.0 Oct 4, 2016

#18 in #thread-local

Download history 58053/week @ 2024-06-16 56781/week @ 2024-06-23 57340/week @ 2024-06-30 67056/week @ 2024-07-07 65303/week @ 2024-07-14 68072/week @ 2024-07-21 70019/week @ 2024-07-28 69401/week @ 2024-08-04 74312/week @ 2024-08-11 69425/week @ 2024-08-18 63857/week @ 2024-08-25 63037/week @ 2024-09-01 64150/week @ 2024-09-08 59081/week @ 2024-09-15 63056/week @ 2024-09-22 55126/week @ 2024-09-29

246,940 downloads per month
Used in 37 crates (10 directly)

MIT/Apache

7KB
100 lines

rust-log-mdc

A mapped diagnostic context (MDC) for use with the log crate.

An MDC is a thread local map of strings used to make relevant information from a system available in its log messages. Logging crates such as log4rs will retrieve values from the MDC for output.

For example, a web server may process many requests simultaneously on different threads. Generating an ID for each request and storing it in the MDC makes it easy to partition log messages on a per-request basis.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

No runtime deps