switch to tracing for logging

This commit is contained in:
Evan Almloff committed 2023-09-06 17:47:33 -05:00
1 parent c8127e164b
commit c55c17cb81
50 files changed
+95 -78

No files matched your search

@@ -1,5 +1,5 @@
use dioxus::prelude::*;
use log::error;
use tracing::error;
use crate::utils::use_router_internal::use_router_internal;
+1 -1
View File
@@ -3,7 +3,7 @@ use std::fmt::Debug;
use std::rc::Rc;
use dioxus::prelude::*;
use log::error;
use tracing::error;
use crate::navigation::NavigationTarget;
use crate::prelude::Routable;
+1 -1
View File
@@ -139,7 +139,7 @@ impl<R: Routable> WebHistory<R> {
);
let current_route = myself.current_route();
log::trace!("initial route: {:?}", current_route);
tracing::trace!("initial route: {:?}", current_route);
let current_url = current_route.to_string();
let state = myself.create_state(current_route);
let _ = replace_state_with_url(&myself.history, &state, Some(&current_url));
+1 -1
View File
@@ -1,8 +1,8 @@
use std::sync::{Arc, Mutex};
use gloo::{events::EventListener, render::AnimationFrame, utils::window};
use log::error;
use serde::{de::DeserializeOwned, Serialize};
use tracing::error;
use url::Url;
use web_sys::{History, ScrollRestoration, Window};
+2 -2
View File
@@ -59,8 +59,8 @@ where
.await?;
}
Err(e) => {
log::info!("@ route: {}", full_path);
log::error!("Error pre-caching static route: {}", e);
tracing::info!("@ route: {}", full_path);
tracing::error!("Error pre-caching static route: {}", e);
}
}
}
+2 -2
View File
@@ -57,7 +57,7 @@ where
match urlencoding::decode(route) {
Ok(segment) => T::from_str(&segment),
Err(err) => {
log::error!("Failed to decode url encoding: {}", err);
tracing::error!("Failed to decode url encoding: {}", err);
T::from_str(route)
}
}
@@ -87,7 +87,7 @@ where
match urlencoding::decode(&segment) {
Ok(segment) => write!(f, "{}", segment)?,
Err(err) => {
log::error!("Failed to decode url encoding: {}", err);
tracing::error!("Failed to decode url encoding: {}", err);
write!(f, "{}", segment)?
}
}