Merge pull request #40 from DogeDark/logger-update
Update `dioxus-logger`
This commit is contained in:
commit
620487b5d3
|
@ -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"
|
|
@ -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);
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue