From f87f1999c6bdf80a1d2bcef30e95389b0f379cab Mon Sep 17 00:00:00 2001 From: Miles Murgaw Date: Tue, 7 May 2024 13:30:04 -0400 Subject: [PATCH] update: dioxus-logger, minor revisions --- Desktop/Cargo.toml | 3 +-- Desktop/src/main.rs | 3 ++- Fullstack/Cargo.toml | 3 +-- Fullstack/src/main.rs | 5 +++-- Liveview/Cargo.toml | 3 +-- Liveview/src/main.rs | 3 ++- Web/Cargo.toml | 3 +-- Web/src/main.rs | 3 ++- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Desktop/Cargo.toml b/Desktop/Cargo.toml index 6a5146a..1c430c3 100644 --- a/Desktop/Cargo.toml +++ b/Desktop/Cargo.toml @@ -16,5 +16,4 @@ dioxus = { version = "0.5", features = ["desktop"] } # Debug -tracing = "0.1.40" -dioxus-logger = "0.5.0" \ No newline at end of file +dioxus-logger = "0.5.1" \ No newline at end of file diff --git a/Desktop/src/main.rs b/Desktop/src/main.rs index 6b06e6b..0fc1c7a 100644 --- a/Desktop/src/main.rs +++ b/Desktop/src/main.rs @@ -1,7 +1,7 @@ #![allow(non_snake_case)] use dioxus::prelude::*; -use tracing::Level; +use dioxus_logger::tracing::{Level, info}; {% if router %} #[derive(Clone, Routable, Debug, PartialEq)] enum Route { @@ -15,6 +15,7 @@ enum Route { fn main() { // Init logger dioxus_logger::init(Level::INFO).expect("failed to init logger"); + info!("starting app"); {% if styling == "Tailwind" %} let cfg = dioxus::desktop::Config::new().with_custom_head(r#""#.to_string()); LaunchBuilder::desktop().with_cfg(cfg).launch(App); diff --git a/Fullstack/Cargo.toml b/Fullstack/Cargo.toml index 95eb859..7c510f9 100644 --- a/Fullstack/Cargo.toml +++ b/Fullstack/Cargo.toml @@ -15,8 +15,7 @@ dioxus = { version = "0.5", features = ["fullstack"] } {% endif %} # Debug -tracing = "0.1.40" -dioxus-logger = "0.5.0" +dioxus-logger = "0.5.1" [features] default = [] diff --git a/Fullstack/src/main.rs b/Fullstack/src/main.rs index 8d24271..a8f6005 100644 --- a/Fullstack/src/main.rs +++ b/Fullstack/src/main.rs @@ -1,7 +1,7 @@ #![allow(non_snake_case)] use dioxus::prelude::*; -use tracing::{Level, info}; +use dioxus_logger::tracing::{Level, info}; {% if router %} #[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)] @@ -16,6 +16,7 @@ enum Route { fn main() { // Init logger dioxus_logger::init(Level::INFO).expect("failed to init logger"); + info!("starting app"); launch(App); } @@ -53,7 +54,7 @@ fn Home() -> Element { button { onclick: move |_| async move { if let Ok(data) = get_server_data().await { - tracing::info!("Client received: {}", data); + info!("Client received: {}", data); text.set(data.clone()); post_server_data(data).await.unwrap(); } diff --git a/Liveview/Cargo.toml b/Liveview/Cargo.toml index 9ed533b..7d3e0f7 100644 --- a/Liveview/Cargo.toml +++ b/Liveview/Cargo.toml @@ -18,5 +18,4 @@ axum = { version = "0.7.4", features = ["ws"] } {% endif %} # Debug -tracing = "0.1.40" -dioxus-logger = "0.5.0" +dioxus-logger = "0.5.1" diff --git a/Liveview/src/main.rs b/Liveview/src/main.rs index 4c5eb2b..c146ab5 100644 --- a/Liveview/src/main.rs +++ b/Liveview/src/main.rs @@ -1,7 +1,7 @@ #![allow(non_snake_case)] use dioxus::prelude::*; -use tracing::Level; +use dioxus_logger::tracing::{Level, info}; {% if router %} #[derive(Clone, Routable, Debug, PartialEq)] enum Route { @@ -15,6 +15,7 @@ enum Route { fn main() { // Init logger dioxus_logger::init(Level::INFO).expect("failed to init logger"); + info!("starting app"); launch(App); } diff --git a/Web/Cargo.toml b/Web/Cargo.toml index 3f6905b..ed67df0 100644 --- a/Web/Cargo.toml +++ b/Web/Cargo.toml @@ -16,5 +16,4 @@ dioxus = { version = "0.5", features = ["web"] } # Debug -tracing = "0.1.40" -dioxus-logger = "0.5.0" \ No newline at end of file +dioxus-logger = "0.5.1" \ No newline at end of file diff --git a/Web/src/main.rs b/Web/src/main.rs index 053d11e..ca9bd42 100644 --- a/Web/src/main.rs +++ b/Web/src/main.rs @@ -1,7 +1,7 @@ #![allow(non_snake_case)] use dioxus::prelude::*; -use tracing::Level; +use dioxus_logger::tracing::{Level, info}; {% if router %} #[derive(Clone, Routable, Debug, PartialEq)] enum Route { @@ -15,6 +15,7 @@ enum Route { fn main() { // Init logger dioxus_logger::init(Level::INFO).expect("failed to init logger"); + info!("starting app"); launch(App); }