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:
1 parent
995a529b2f
commit
7d490dc3bd
36 files changed
+255
-169
No files matched your search
@@ -27,6 +27,7 @@ dioxus-fullstack = { workspace = true, default-features = true, optional = true
|
||||
dioxus-liveview = { workspace = true, optional = true }
|
||||
dioxus-ssr = { workspace = true, optional = true }
|
||||
manganis = { workspace = true, features = ["dioxus"], optional = true }
|
||||
dioxus-logger = { workspace = true, optional = true }
|
||||
|
||||
serde = { version = "1.0.136", optional = true }
|
||||
dioxus-cli-config = { workspace = true, optional = true }
|
||||
@@ -35,7 +36,7 @@ dioxus-cli-config = { workspace = true, optional = true }
|
||||
dioxus-devtools = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
default = ["macro", "html", "devtools", "signals", "hooks", "launch", "mounted", "file_engine", "document", "asset"]
|
||||
default = ["macro", "html", "signals", "hooks", "launch", "mounted", "file_engine", "document", "asset", "devtools", "logger"]
|
||||
minimal = ["macro", "html", "signals", "hooks", "launch"]
|
||||
signals = ["dep:dioxus-signals"]
|
||||
macro = ["dep:dioxus-core-macro"]
|
||||
@@ -46,6 +47,7 @@ mounted = ["dioxus-web?/mounted", "dioxus-html?/mounted"]
|
||||
file_engine = ["dioxus-web?/file_engine"]
|
||||
asset = ["dep:manganis"]
|
||||
document = ["dioxus-web?/document", "dep:dioxus-document", "dep:dioxus-history"]
|
||||
logger = ["dep:dioxus-logger"]
|
||||
|
||||
launch = ["dep:dioxus-config-macro"]
|
||||
router = ["dep:dioxus-router"]
|
||||
|
||||
@@ -155,6 +155,9 @@ impl LaunchBuilder {
|
||||
}
|
||||
|
||||
fn launch_inner(self, app: fn() -> Element) {
|
||||
#[cfg(feature = "logger")]
|
||||
dioxus_logger::initialize_default();
|
||||
|
||||
#[cfg(all(feature = "fullstack", any(feature = "desktop", feature = "mobile")))]
|
||||
{
|
||||
use dioxus_fullstack::prelude::server_fn::client::{get_server_url, set_server_url};
|
||||
|
||||
@@ -65,6 +65,10 @@ pub use dioxus_html as html;
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "macro")))]
|
||||
pub use dioxus_core_macro as core_macro;
|
||||
|
||||
#[cfg(feature = "logger")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "logger")))]
|
||||
pub use dioxus_logger as logger;
|
||||
|
||||
pub mod prelude {
|
||||
#[cfg(feature = "document")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "document")))]
|
||||
|
||||
Reference in new issue
Block a user