Skip to content

Commit

Permalink
Merge pull request #40 from DogeDark/logger-update
Browse files Browse the repository at this point in the history
Update `dioxus-logger`
  • Loading branch information
jkelleyrtp authored Jul 24, 2024
2 parents 7b98ff4 + f87f199 commit 620487b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
3 changes: 1 addition & 2 deletions Desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ dioxus = { version = "0.5", features = ["desktop"] }


# Debug
tracing = "0.1.40"
dioxus-logger = "0.5.0"
dioxus-logger = "0.5.1"
3 changes: 2 additions & 1 deletion Desktop/src/main.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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#"<link rel="stylesheet" href="tailwind.css">"#.to_string());
LaunchBuilder::desktop().with_cfg(cfg).launch(App);
Expand Down
3 changes: 1 addition & 2 deletions Fullstack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
5 changes: 3 additions & 2 deletions Fullstack/src/main.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -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);
}

Expand Down Expand Up @@ -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();
}
Expand Down
3 changes: 1 addition & 2 deletions Liveview/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion Liveview/src/main.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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);
}

Expand Down
3 changes: 1 addition & 2 deletions Web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ dioxus = { version = "0.5", features = ["web"] }


# Debug
tracing = "0.1.40"
dioxus-logger = "0.5.0"
dioxus-logger = "0.5.1"
3 changes: 2 additions & 1 deletion Web/src/main.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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);
}

Expand Down

0 comments on commit 620487b

Please sign in to comment.