fix(web): tracing in web too
This commit is contained in:
parent
9b64503c02
commit
cd67863a47
2 changed files with 11 additions and 2 deletions
|
@ -14,7 +14,8 @@ repository = "https://git.alemi.dev/upub.git"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
console_log = "1.0"
|
tracing-subscriber = "0.3"
|
||||||
|
tracing-subscriber-wasm = "0.1"
|
||||||
console_error_panic_hook = "0.1"
|
console_error_panic_hook = "0.1"
|
||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
_ = console_log::init_with_level(log::Level::Info);
|
|
||||||
console_error_panic_hook::set_once();
|
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);
|
leptos::mount_to_body(upub_web::App);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue