|
13 | 13 | //! - [`AsTrace`] and [`AsLog`] traits for converting between `tracing` and `log` types. |
14 | 14 | //! - [`LogTracer`], a [`log::Log`] implementation that consumes [`log::Record`]s |
15 | 15 | //! and outputs them as [`tracing::Event`]. |
16 | | -//! - An [`env_logger`] module, with helpers for using the [`env_logger` crate] |
17 | | -//! with `tracing` (optional, enabled by the `env-logger` feature). |
18 | 16 | //! |
19 | 17 | //! *Compiler support: [requires `rustc` 1.56+][msrv]* |
20 | 18 | //! |
|
57 | 55 | //! |
58 | 56 | //! ## Caution: Mixing both conversions |
59 | 57 | //! |
60 | | -//! Note that logger implementations that convert log records to trace events |
| 58 | +//! Note that `log::Logger` implementations that convert log records to trace events |
61 | 59 | //! should not be used with `Subscriber`s that convert trace events _back_ into |
62 | | -//! log records (such as the `TraceLogger`), as doing so will result in the |
63 | | -//! event recursing between the subscriber and the logger forever (or, in real |
64 | | -//! life, probably overflowing the call stack). |
| 60 | +//! `log` records, as doing so will result in the event recursing between the subscriber |
| 61 | +//! and the logger forever (or, in real life, probably overflowing the call stack). |
65 | 62 | //! |
66 | 63 | //! If the logging of trace events generated from log records produced by the |
67 | 64 | //! `log` crate is desired, either the `log` crate should not be used to |
68 | 65 | //! implement this logging, or an additional layer of filtering will be |
69 | 66 | //! required to avoid infinitely converting between `Event` and `log::Record`. |
70 | 67 | //! |
71 | | -//! # Feature Flags |
72 | | -//! * `trace-logger`: enables an experimental `log` subscriber, deprecated since |
73 | | -//! version 0.1.1. |
| 68 | +//! ## Feature Flags |
| 69 | +//! |
| 70 | +//! * `std`: enables features that require the Rust standard library (on by default) |
74 | 71 | //! * `log-tracer`: enables the `LogTracer` type (on by default) |
75 | | -//! * `env_logger`: enables the `env_logger` module, with helpers for working |
76 | | -//! with the [`env_logger` crate]. |
77 | 72 | //! * `interest-cache`: makes it possible to configure an interest cache for |
78 | 73 | //! logs emitted through the `log` crate (see [`Builder::with_interest_cache`]); requires `std` |
79 | 74 | //! |
|
94 | 89 | //! [`init`]: LogTracer::init |
95 | 90 | //! [`init_with_filter`]: LogTracer::init_with_filter |
96 | 91 | //! [`tracing`]: https://crates.io/crates/tracing |
97 | | -//! [`env_logger` crate]: https://crates.io/crates/env-logger |
98 | 92 | //! [`tracing::Subscriber`]: https://docs.rs/tracing/latest/tracing/trait.Subscriber.html |
99 | 93 | //! [`Subscriber`]: https://docs.rs/tracing/latest/tracing/trait.Subscriber.html |
100 | 94 | //! [`tracing::Event`]: https://docs.rs/tracing/latest/tracing/struct.Event.html |
@@ -143,33 +137,11 @@ use tracing_core::{ |
143 | 137 | #[cfg_attr(docsrs, doc(cfg(feature = "log-tracer")))] |
144 | 138 | pub mod log_tracer; |
145 | 139 |
|
146 | | -#[cfg(feature = "trace-logger")] |
147 | | -#[cfg_attr(docsrs, doc(cfg(feature = "trace-logger")))] |
148 | | -pub mod trace_logger; |
149 | | - |
150 | 140 | #[cfg(feature = "log-tracer")] |
151 | 141 | #[cfg_attr(docsrs, doc(cfg(feature = "log-tracer")))] |
152 | 142 | #[doc(inline)] |
153 | 143 | pub use self::log_tracer::LogTracer; |
154 | 144 |
|
155 | | -#[cfg(feature = "trace-logger")] |
156 | | -#[cfg_attr(docsrs, doc(cfg(feature = "trace-logger")))] |
157 | | -#[deprecated( |
158 | | - since = "0.1.1", |
159 | | - note = "use the `tracing` crate's \"log\" feature flag instead" |
160 | | -)] |
161 | | -#[allow(deprecated)] |
162 | | -#[doc(inline)] |
163 | | -pub use self::trace_logger::TraceLogger; |
164 | | - |
165 | | -#[cfg(feature = "env_logger")] |
166 | | -#[cfg_attr(docsrs, doc(cfg(feature = "env_logger")))] |
167 | | -#[deprecated( |
168 | | - since = "0.1.4", |
169 | | - note = "use `tracing-subscriber`'s `fmt::Subscriber` instead" |
170 | | -)] |
171 | | -pub mod env_logger; |
172 | | - |
173 | 145 | pub use log; |
174 | 146 |
|
175 | 147 | #[cfg(all(feature = "interest-cache", feature = "log-tracer", feature = "std"))] |
|
0 commit comments