tracing-web
A tracing
compatible subscriber layer for web platforms.

Documentation
Overview
tracing-web
can be used in conjunction with the tracing-subscriber
crate to quickly install a
subscriber that emits messages to the dev-tools console, and events to the Performance API. An example
configuration can look like
use tracing_web::{MakeConsoleWriter, performance_layer};
use tracing_subscriber::fmt::format::Pretty;
use tracing_subscriber::fmt::time::UtcTime;
use tracing_subscriber::prelude::*;
fn main() {
let fmt_layer = tracing_subscriber::fmt::layer()
.with_ansi(false) .with_timer(UtcTime::rfc_3339()) .with_writer(MakeConsoleWriter); let perf_layer = performance_layer()
.with_details_from_fields(Pretty::default());
tracing_subscriber::registry()
.with(fmt_layer)
.with(perf_layer)
.init();
todo!("write your awesome application");
}
License
This project is dual licensed under the MIT license and the Apache license.