feat: integrate dioxus-logger inline (#3302)

* feat: integrate dioxus-logger inline

* remove log/simple logger references

* fix: add dioxus-data-id-0 to root elements to not emit errors internally

* drop config.toml and use cargo.toml profiles instead

* make clippy happy with the unit value lint

* feat: better presentation for logging
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-12-06 16:27:05 -08:00
1 parent 995a529b2f
commit 7d490dc3bd
36 files changed
+255 -169

No files matched your search

-10
View File
@@ -13,7 +13,6 @@ use wasm_bindgen::JsCast as _;
pub struct Config {
pub(crate) hydrate: bool,
pub(crate) root: ConfigRoot,
pub(crate) default_panic_hook: bool,
}
impl LaunchConfig for Config {}
@@ -68,14 +67,6 @@ impl Config {
self.root = ConfigRoot::RootNode(node);
self
}
/// Set whether or not Dioxus should use the built-in panic hook or defer to your own.
///
/// The panic hook is set to true normally so even the simplest apps have helpful error messages.
pub fn with_default_panic_hook(mut self, f: bool) -> Self {
self.default_panic_hook = f;
self
}
}
impl Default for Config {
@@ -83,7 +74,6 @@ impl Default for Config {
Self {
hydrate: false,
root: ConfigRoot::RootName("main".to_string()),
default_panic_hook: true,
}
}
}
-5
View File
@@ -66,11 +66,6 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
#[cfg(feature = "document")]
virtual_dom.in_runtime(document::init_document);
#[cfg(feature = "panic_hook")]
if web_config.default_panic_hook {
console_error_panic_hook::set_once();
}
#[cfg(all(feature = "devtools", debug_assertions))]
let mut hotreload_rx = devtools::init();