Skip to content

Commit

Permalink
Remove TraceLogger
Browse files Browse the repository at this point in the history
The `TraceLogger` implementation is deprecated and this PR removes it
completely.

Unresolved: there is an example in `tracing-macros`, "factorial", that uses
`TraceLogger` as an example of the `tracing_macros::dbg`. The macro itself seems
broken though, so not sure if it needs to be fixed.
  • Loading branch information
dvdplm committed Oct 19, 2020
1 parent a8cc977 commit 34fa631
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 487 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.1.2"}
Expand Down
19 changes: 1 addition & 18 deletions tracing-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
//!
//! 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
//! log records (such as the old `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).
//!
Expand All @@ -69,8 +69,6 @@
//! 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 @@ -150,25 +147,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 34fa631

Please sign in to comment.