tracing_fmt/
lib.rs

1//! A `Subscriber` for formatting and logging `tracing` data.
2//!
3//! **Note**: This library is now part of the [`tracing-subscriber`] crate. This
4//! crate now re-exports its public API from `tracing-subscriber`. Using
5//! `tracing-fmt` is now deprecated; users are encouraged to use the APIs in
6//! this library from their new home in `tracing-subscriber::fmt`.
7//!
8//! ## Overview
9//!
10//! [`tracing`] is a framework for instrumenting Rust programs with context-aware,
11//! structured, event-based diagnostic information. This crate provides an
12//! implementation of the [`Subscriber`] trait that records `tracing`'s `Event`s
13//! and `Span`s by formatting them as text and logging them to stdout.
14//!
15//!
16//! [`tracing`]: https://crates.io/crates/tracing
17//! [`Subscriber`]: https://docs.rs/tracing/latest/tracing/trait.Subscriber.html
18//! [`tracing-subscriber`]: https://crates.io/crates/tracing-subscriber/
19#![doc(html_root_url = "https://docs.rs/tracing-fmt/0.1.1")]
20#![cfg_attr(test, deny(warnings))]
21#![deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt`")]
22
23#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt`")]
24#[doc(inline)]
25pub use crate::{format::FormatEvent, writer::MakeWriter};
26
27#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt`")]
28#[doc(inline)]
29pub use tracing_subscriber::{fmt::Builder, fmt::Context, FmtSubscriber};
30
31#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt::format`")]
32pub mod format {
33    #[doc(inline)]
34    pub use tracing_subscriber::fmt::format::*;
35}
36
37#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt::writer`")]
38pub mod writer {
39    #[doc(inline)]
40    pub use tracing_subscriber::fmt::writer::*;
41}
42
43#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::fmt::time`")]
44pub mod time {
45    #[doc(inline)]
46    pub use tracing_subscriber::fmt::time::*;
47}
48
49#[deprecated(since = "0.1.1", note = "moved to `tracing-subscriber::filter`")]
50pub mod filter {
51    #[doc(inline)]
52    pub use tracing_subscriber::Filter as EnvFilter;
53}