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
|
# Debug
|
||||||
tracing = "0.1.40"
|
dioxus-logger = "0.5.1"
|
||||||
dioxus-logger = "0.5.0"
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use tracing::Level;
|
use dioxus_logger::tracing::{Level, info};
|
||||||
{% if router %}
|
{% if router %}
|
||||||
#[derive(Clone, Routable, Debug, PartialEq)]
|
#[derive(Clone, Routable, Debug, PartialEq)]
|
||||||
enum Route {
|
enum Route {
|
||||||
|
@ -15,6 +15,7 @@ enum Route {
|
||||||
fn main() {
|
fn main() {
|
||||||
// Init logger
|
// Init logger
|
||||||
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
||||||
|
info!("starting app");
|
||||||
{% if styling == "Tailwind" %}
|
{% if styling == "Tailwind" %}
|
||||||
let cfg = dioxus::desktop::Config::new().with_custom_head(r#"<link rel="stylesheet" href="tailwind.css">"#.to_string());
|
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);
|
LaunchBuilder::desktop().with_cfg(cfg).launch(App);
|
||||||
|
|
|
@ -15,8 +15,7 @@ dioxus = { version = "0.5", features = ["fullstack"] }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
tracing = "0.1.40"
|
dioxus-logger = "0.5.1"
|
||||||
dioxus-logger = "0.5.0"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use tracing::{Level, info};
|
use dioxus_logger::tracing::{Level, info};
|
||||||
|
|
||||||
{% if router %}
|
{% if router %}
|
||||||
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||||
|
@ -16,6 +16,7 @@ enum Route {
|
||||||
fn main() {
|
fn main() {
|
||||||
// Init logger
|
// Init logger
|
||||||
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
||||||
|
info!("starting app");
|
||||||
launch(App);
|
launch(App);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ fn Home() -> Element {
|
||||||
button {
|
button {
|
||||||
onclick: move |_| async move {
|
onclick: move |_| async move {
|
||||||
if let Ok(data) = get_server_data().await {
|
if let Ok(data) = get_server_data().await {
|
||||||
tracing::info!("Client received: {}", data);
|
info!("Client received: {}", data);
|
||||||
text.set(data.clone());
|
text.set(data.clone());
|
||||||
post_server_data(data).await.unwrap();
|
post_server_data(data).await.unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,4 @@ axum = { version = "0.7.4", features = ["ws"] }
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
tracing = "0.1.40"
|
dioxus-logger = "0.5.1"
|
||||||
dioxus-logger = "0.5.0"
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use tracing::Level;
|
use dioxus_logger::tracing::{Level, info};
|
||||||
{% if router %}
|
{% if router %}
|
||||||
#[derive(Clone, Routable, Debug, PartialEq)]
|
#[derive(Clone, Routable, Debug, PartialEq)]
|
||||||
enum Route {
|
enum Route {
|
||||||
|
@ -15,6 +15,7 @@ enum Route {
|
||||||
fn main() {
|
fn main() {
|
||||||
// Init logger
|
// Init logger
|
||||||
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
||||||
|
info!("starting app");
|
||||||
launch(App);
|
launch(App);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,4 @@ dioxus = { version = "0.5", features = ["web"] }
|
||||||
|
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
tracing = "0.1.40"
|
dioxus-logger = "0.5.1"
|
||||||
dioxus-logger = "0.5.0"
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use tracing::Level;
|
use dioxus_logger::tracing::{Level, info};
|
||||||
{% if router %}
|
{% if router %}
|
||||||
#[derive(Clone, Routable, Debug, PartialEq)]
|
#[derive(Clone, Routable, Debug, PartialEq)]
|
||||||
enum Route {
|
enum Route {
|
||||||
|
@ -15,6 +15,7 @@ enum Route {
|
||||||
fn main() {
|
fn main() {
|
||||||
// Init logger
|
// Init logger
|
||||||
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
dioxus_logger::init(Level::INFO).expect("failed to init logger");
|
||||||
|
info!("starting app");
|
||||||
launch(App);
|
launch(App);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue