1![Tracing — Structured, application-level diagnostics][splash] 2 3[splash]: https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/splash.svg 4 5# tracing-log 6 7[`log`] compatibility for [`tracing`]. 8 9[![Crates.io][crates-badge]][crates-url] 10[![Documentation][docs-badge]][docs-url] 11[![Documentation (master)][docs-master-badge]][docs-master-url] 12[![MIT licensed][mit-badge]][mit-url] 13[![Build Status][actions-badge]][actions-url] 14[![Discord chat][discord-badge]][discord-url] 15![maintenance status][maint-badge] 16 17[Documentation][docs-url] | [Chat (discord)][discord-url] 18 19 20[crates-badge]: https://img.shields.io/crates/v/tracing-log.svg 21[crates-url]: https://crates.io/crates/tracing-log 22[docs-badge]: https://docs.rs/tracing-log/badge.svg 23[docs-url]: https://docs.rs/tracing-log 24[docs-master-badge]: https://img.shields.io/badge/docs-master-blue 25[docs-master-url]: https://tracing-rs.netlify.com/tracing_log 26[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg 27[mit-url]: LICENSE 28[actions-badge]: https://github.com/tokio-rs/tracing/workflows/CI/badge.svg 29[actions-url]:https://github.com/tokio-rs/tracing/actions?query=workflow%3ACI 30[discord-badge]: https://img.shields.io/discord/500028886025895936?logo=discord&label=discord&logoColor=white 31[discord-url]: https://discord.gg/EeF3cQw 32[maint-badge]: https://img.shields.io/badge/maintenance-experimental-blue.svg 33 34## Overview 35 36[`tracing`] is a framework for instrumenting Rust programs with context-aware, 37structured, event-based diagnostic information. This crate provides 38compatibility layers for using `tracing` alongside the logging facade provided 39by the [`log`] crate. 40 41This crate provides: 42 43- [`AsTrace`] and [`AsLog`] traits for converting between `tracing` and `log` types. 44- [`LogTracer`], a [`log::Log`] implementation that consumes [`log::Record`]s 45 and outputs them as [`tracing::Event`]s. 46- An [`env_logger`] module, with helpers for using the [`env_logger` crate] 47 with `tracing` (optional, enabled by the `env_logger` feature). 48 49[`tracing`]: https://crates.io/crates/tracing 50[`log`]: https://crates.io/crates/log 51[`AsTrace`]: https://docs.rs/tracing-log/latest/tracing_log/trait.AsTrace.html 52[`AsLog`]: https://docs.rs/tracing-log/latest/tracing_log/trait.AsLog.html 53[`LogTracer`]: https://docs.rs/tracing-log/latest/tracing_log/struct.LogTracer.html 54[`log::Log`]: https://docs.rs/log/latest/log/trait.Log.html 55[`log::Record`]: https://docs.rs/log/latest/log/struct.Record.html 56[`tracing::Subscriber`]: https://docs.rs/tracing/latest/tracing/trait.Subscriber.html 57[`tracing::Event`]: https://docs.rs/tracing/latest/tracing/struct.Event.html 58 59*Compiler support: [requires `rustc` 1.42+][msrv]* 60 61[msrv]: #supported-rust-versions 62 63## Supported Rust Versions 64 65Tracing is built against the latest stable release. The minimum supported 66version is 1.42. The current Tracing version is not guaranteed to build on Rust 67versions earlier than the minimum supported version. 68 69Tracing follows the same compiler support policies as the rest of the Tokio 70project. The current stable Rust compiler and the three most recent minor 71versions before it will always be supported. For example, if the current stable 72compiler version is 1.45, the minimum supported version will not be increased 73past 1.42, three minor versions prior. Increasing the minimum supported compiler 74version is not considered a semver breaking change as long as doing so complies 75with this policy. 76 77## License 78 79This project is licensed under the [MIT license](LICENSE). 80 81### Contribution 82 83Unless you explicitly state otherwise, any contribution intentionally submitted 84for inclusion in Tracing by you, shall be licensed as MIT, without any additional 85terms or conditions. 86