From 6e74d08bf5fe0b80a7a68e90c4c27521482e36e3 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Mon, 11 Sep 2023 19:42:08 -0500 Subject: [PATCH] remove log from a few examples --- Cargo.toml | 1 - packages/fullstack/examples/axum-hello-world/Cargo.toml | 5 +++-- packages/fullstack/examples/axum-hello-world/src/main.rs | 5 ++--- packages/fullstack/examples/salvo-hello-world/Cargo.toml | 5 +++-- packages/fullstack/examples/salvo-hello-world/src/main.rs | 4 ++-- packages/fullstack/examples/warp-hello-world/Cargo.toml | 5 +++-- packages/fullstack/examples/warp-hello-world/src/main.rs | 6 +++--- packages/web/Cargo.toml | 1 - 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9cc7caaea..6378d9983 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,6 @@ generational-box = { path = "packages/generational-box" } dioxus-hot-reload = { path = "packages/hot-reload", version = "0.4.0" } dioxus-fullstack = { path = "packages/fullstack", version = "0.4.1" } dioxus_server_macro = { path = "packages/server-macro", version = "0.4.1" } -log = "0.4.19" tracing = "0.1.37" tracing-futures = "0.2.5" tokio = "1.28" diff --git a/packages/fullstack/examples/axum-hello-world/Cargo.toml b/packages/fullstack/examples/axum-hello-world/Cargo.toml index 2073e4655..a3b68b05a 100644 --- a/packages/fullstack/examples/axum-hello-world/Cargo.toml +++ b/packages/fullstack/examples/axum-hello-world/Cargo.toml @@ -12,8 +12,9 @@ dioxus-fullstack = { workspace = true } axum = { version = "0.6.12", optional = true } serde = "1.0.159" simple_logger = "4.2.0" -wasm-logger = "0.2.0" -log.workspace = true +tracing-wasm = "0.2.1" +tracing.workspace = true +tracing-subscriber = "0.3.17" reqwest = "0.11.18" [features] diff --git a/packages/fullstack/examples/axum-hello-world/src/main.rs b/packages/fullstack/examples/axum-hello-world/src/main.rs index 953c6cd7e..8f1d3c8c6 100644 --- a/packages/fullstack/examples/axum-hello-world/src/main.rs +++ b/packages/fullstack/examples/axum-hello-world/src/main.rs @@ -12,7 +12,6 @@ use dioxus_fullstack::{ prelude::*, }; use serde::{Deserialize, Serialize}; -use wasm_logger::Config; #[derive(Props, PartialEq, Debug, Default, Serialize, Deserialize, Clone)] struct AppProps { @@ -66,9 +65,9 @@ async fn get_server_data() -> Result { fn main() { #[cfg(feature = "web")] - wasm_logger::init(wasm_logger::Config::new(tracing::Level::Trace)); + tracing_wasm::set_as_global_default(); #[cfg(feature = "ssr")] - simple_logger::SimpleLogger::new().init().unwrap(); + tracing_subscriber::fmt::init(); LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch() } diff --git a/packages/fullstack/examples/salvo-hello-world/Cargo.toml b/packages/fullstack/examples/salvo-hello-world/Cargo.toml index 977ad7843..ca0d85ecf 100644 --- a/packages/fullstack/examples/salvo-hello-world/Cargo.toml +++ b/packages/fullstack/examples/salvo-hello-world/Cargo.toml @@ -16,8 +16,9 @@ salvo = { version = "0.37.9", optional = true } execute = "0.2.12" reqwest = "0.11.18" simple_logger = "4.2.0" -log.workspace = true -wasm-logger = "0.2.0" +tracing-wasm = "0.2.1" +tracing.workspace = true +tracing-subscriber = "0.3.17" [features] default = [] diff --git a/packages/fullstack/examples/salvo-hello-world/src/main.rs b/packages/fullstack/examples/salvo-hello-world/src/main.rs index a2c2f0954..838ee6f2c 100644 --- a/packages/fullstack/examples/salvo-hello-world/src/main.rs +++ b/packages/fullstack/examples/salvo-hello-world/src/main.rs @@ -60,9 +60,9 @@ async fn get_server_data() -> Result { fn main() { #[cfg(feature = "web")] - wasm_logger::init(wasm_logger::Config::new(tracing::Level::Trace)); + tracing_wasm::set_as_global_default(); #[cfg(feature = "ssr")] - simple_logger::SimpleLogger::new().init().unwrap(); + tracing_subscriber::fmt::init(); LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch() } diff --git a/packages/fullstack/examples/warp-hello-world/Cargo.toml b/packages/fullstack/examples/warp-hello-world/Cargo.toml index d9e82b4c4..1474facf3 100644 --- a/packages/fullstack/examples/warp-hello-world/Cargo.toml +++ b/packages/fullstack/examples/warp-hello-world/Cargo.toml @@ -16,8 +16,9 @@ warp = { version = "0.3.3", optional = true } execute = "0.2.12" reqwest = "0.11.18" simple_logger = "4.2.0" -log.workspace = true -wasm-logger = "0.2.0" +tracing-wasm = "0.2.1" +tracing.workspace = true +tracing-subscriber = "0.3.17" [features] default = [] diff --git a/packages/fullstack/examples/warp-hello-world/src/main.rs b/packages/fullstack/examples/warp-hello-world/src/main.rs index a2c2f0954..0fd70defc 100644 --- a/packages/fullstack/examples/warp-hello-world/src/main.rs +++ b/packages/fullstack/examples/warp-hello-world/src/main.rs @@ -60,9 +60,9 @@ async fn get_server_data() -> Result { fn main() { #[cfg(feature = "web")] - wasm_logger::init(wasm_logger::Config::new(tracing::Level::Trace)); + tracing_wasm::set_as_global_default(); #[cfg(feature = "ssr")] - simple_logger::SimpleLogger::new().init().unwrap(); - + tracing_subscriber::fmt::init(); + LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch() } diff --git a/packages/web/Cargo.toml b/packages/web/Cargo.toml index bb84fbb2b..dad75ba18 100644 --- a/packages/web/Cargo.toml +++ b/packages/web/Cargo.toml @@ -21,7 +21,6 @@ js-sys = "0.3.56" wasm-bindgen = { workspace = true, features = ["enable-interning"] } wasm-bindgen-futures = "0.4.29" tracing = { workspace = true } -log = { workspace = true } rustc-hash = { workspace = true } console_error_panic_hook = { version = "0.1.7", optional = true } futures-util = { workspace = true, features = ["std", "async-await", "async-await-macro"] }