Crate tracing_logfmt
source ·Expand description
Formatter for logging tracing_subscriber
events in logfmt format.
Use as a formatting layer in tracing subscriber:
use tracing::dispatcher::{self, Dispatch};
use tracing_subscriber::Registry;
use tracing_subscriber::layer::SubscriberExt;
let subscriber = Registry::default()
.with(tracing_logfmt::layer());
dispatcher::set_global_default(Dispatch::new(subscriber))
.expect("Global logger has already been set!");
Structs§
- A formatter that formats tracing-subscriber events into logfmt formatted log rows.
- A formatter that formats span fields into logfmt.
Functions§
- Create a builder that can be used to configure the formatter.
- Creates a formatting layer