mirror of
https://github.com/Nutomic/ibis.git
synced 2024-12-03 17:11:08 +00:00
Working browser console logs
This commit is contained in:
parent
4d1625526e
commit
0d93ac31a3
4 changed files with 14 additions and 1 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -585,6 +585,16 @@ dependencies = [
|
|||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console_log"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be8aed40e4edbf4d3b4431ab260b63fdc40f5780a4766824329ea0f1eefe3c0f"
|
||||
dependencies = [
|
||||
"log",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const-oid"
|
||||
version = "0.9.6"
|
||||
|
@ -1783,6 +1793,7 @@ dependencies = [
|
|||
"codee",
|
||||
"config",
|
||||
"console_error_panic_hook",
|
||||
"console_log",
|
||||
"diesel",
|
||||
"diesel-derive-newtype",
|
||||
"diesel_migrations",
|
||||
|
|
|
@ -119,6 +119,7 @@ async-trait = { version = "0.1.83", optional = true }
|
|||
config = { version = "0.14.0", features = ["toml"], optional = true }
|
||||
tower = { version = "0.5.1", optional = true }
|
||||
tower-layer = { version = "0.3.3", optional = true }
|
||||
console_log = "1.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.4.1"
|
||||
|
|
|
@ -50,7 +50,7 @@ impl ApiClient {
|
|||
let ssl;
|
||||
#[cfg(not(feature = "ssr"))]
|
||||
{
|
||||
use leptos_use::{use_document};
|
||||
use leptos_use::use_document;
|
||||
hostname = use_document().location().unwrap().host().unwrap();
|
||||
ssl = !cfg!(debug_assertions);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ pub mod pages;
|
|||
#[wasm_bindgen::prelude::wasm_bindgen]
|
||||
pub fn hydrate() {
|
||||
use crate::frontend::app::App;
|
||||
console_log::init_with_level(log::Level::Debug).expect("error initializing logger");
|
||||
console_error_panic_hook::set_once();
|
||||
leptos::mount_to_body(App);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue