init() So for a basic example, I used: use tracing::info; use tracing_subscriber; fn main() { tracing_subscriber::fmt::init(); info!("Test"); } This doesn't output anything in the console for me: ❯ cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.07s Running ...
tracing-webcan be used in conjunction with thetracing-subscribercrate to quickly install a subscriber that emits messages to the dev-tools console, and events to thePerformance API. An example configuration can look like usetracing_web::{MakeWebConsoleWriter,performance_layer};usetracing_subscriber:...
This example will set up a formatting tracing_subscriber::Layer which is then added to the registry. The output from the task spawned afterwards will be seen in stdout. use tracing_subscriber::prelude::*; #[tokio::main] async fn main() { let layer = ari_subscriber::layer(); tracing_su...
However, the biggest advantage of implementing this inEnvFilteris that the warning messages we generate could include the particular filtering directive(s) that would not be enabled. For example, we could print something like RUST_LOG=foo=debug,bar::baz=trace,quux=info,warn myapp warning: some ...