diff --git a/web/Cargo.toml b/web/Cargo.toml index 74ac7252..3c3ed520 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -14,7 +14,8 @@ repository = "https://git.alemi.dev/upub.git" [dependencies] log = "0.4" tracing = "0.1" -console_log = "1.0" +tracing-subscriber = "0.3" +tracing-subscriber-wasm = "0.1" console_error_panic_hook = "0.1" thiserror = "1" serde = { version = "1", features = ["derive"] } diff --git a/web/src/main.rs b/web/src/main.rs index 48291ecc..44655aee 100644 --- a/web/src/main.rs +++ b/web/src/main.rs @@ -1,6 +1,14 @@ fn main() { - _ = console_log::init_with_level(log::Level::Info); console_error_panic_hook::set_once(); + tracing_subscriber::fmt() + .with_writer( + tracing_subscriber_wasm::MakeConsoleWriter::default() + .map_trace_level_to(tracing::Level::DEBUG) + ) + .with_ansi(false) + .without_time() + .init(); + leptos::mount_to_body(upub_web::App); }