Merge pull request #40 from DogeDark/logger-update

Update `dioxus-logger`
This commit is contained in:
Jonathan Kelley 2024-07-24 13:53:19 -07:00 committed by GitHub
commit 620487b5d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 13 deletions

View File

@ -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"

View File

@ -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#"<link rel="stylesheet" href="tailwind.css">"#.to_string());
LaunchBuilder::desktop().with_cfg(cfg).launch(App);

View File

@ -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 = []

View File

@ -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();
}

View File

@ -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"

View File

@ -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);
}

View File

@ -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"

View File

@ -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);
}