Skip to content

Commit

Permalink
subscriber: remove TraceLogger (#1052)
Browse files Browse the repository at this point in the history
* Remove TraceLogger

The `TraceLogger` implementation is deprecated and this PR removes it
completely.
  • Loading branch information
dvdplm authored Oct 21, 2020
1 parent 67340e9 commit 0dc8ef2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 489 deletions.
3 changes: 1 addition & 2 deletions tracing-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ license = "MIT"
readme = "README.md"

[features]
default = ["log-tracer", "trace-logger", "std"]
default = ["log-tracer", "std"]
std = ["log/std"]
log-tracer = []
trace-logger = []

[dependencies]
tracing-core = { path = "../tracing-core", version = "0.2"}
Expand Down
23 changes: 3 additions & 20 deletions tracing-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,16 @@
//!
//! Note that logger implementations that convert log records to trace events
//! should not be used with `Subscriber`s that convert trace events _back_ into
//! log records (such as the `TraceLogger`), as doing so will result in the
//! event recursing between the subscriber and the logger forever (or, in real
//! life, probably overflowing the call stack).
//! log records, as doing so will result in the event recursing between the
//! subscriber and the logger forever (or, in real life, probably overflowing
//! the call stack).
//!
//! If the logging of trace events generated from log records produced by the
//! `log` crate is desired, either the `log` crate should not be used to
//! implement this logging, or an additional layer of filtering will be
//! required to avoid infinitely converting between `Event` and `log::Record`.
//!
//! # Feature Flags
//! * `trace-logger`: enables an experimental `log` subscriber, deprecated since
//! version 0.1.1.
//! * `log-tracer`: enables the `LogTracer` type (on by default)
//! * `env_logger`: enables the `env_logger` module, with helpers for working
//! with the [`env_logger` crate].
Expand All @@ -94,7 +92,6 @@
//! [`AsTrace`]: trait.AsTrace.html
//! [`AsLog`]: trait.AsLog.html
//! [`LogTracer`]: struct.LogTracer.html
//! [`TraceLogger`]: struct.TraceLogger.html
//! [`env_logger`]: env_logger/index.html
//! [`tracing`]: https://crates.io/crates/tracing
//! [`log`]: https://crates.io/crates/log
Expand Down Expand Up @@ -151,25 +148,11 @@ use tracing_core::{
#[cfg_attr(docsrs, doc(cfg(feature = "log-tracer")))]
pub mod log_tracer;

#[cfg(feature = "trace-logger")]
#[cfg_attr(docsrs, doc(cfg(feature = "trace-logger")))]
pub mod trace_logger;

#[cfg(feature = "log-tracer")]
#[cfg_attr(docsrs, doc(cfg(feature = "log-tracer")))]
#[doc(inline)]
pub use self::log_tracer::LogTracer;

#[cfg(feature = "trace-logger")]
#[cfg_attr(docsrs, doc(cfg(feature = "trace-logger")))]
#[deprecated(
since = "0.1.1",
note = "use the `tracing` crate's \"log\" feature flag instead"
)]
#[allow(deprecated)]
#[doc(inline)]
pub use self::trace_logger::TraceLogger;

#[cfg(feature = "env_logger")]
#[cfg_attr(docsrs, doc(cfg(feature = "env_logger")))]
pub mod env_logger;
Expand Down
Loading

0 comments on commit 0dc8ef2

Please sign in to comment.