Merge branch 'master' into events-2
This commit is contained in:
commit
219c068283
368 files changed
+1877
-13500
No files matched your search
@@ -46,7 +46,7 @@ impl WebEvaluator {
|
||||
Ok(data) => _ = channel_sender.send_blocking(data),
|
||||
Err(e) => {
|
||||
// Can't really do much here.
|
||||
log::error!("failed to serialize JsValue to serde_json::Value (eval communication) - {}", e);
|
||||
tracing::error!("failed to serialize JsValue to serde_json::Value (eval communication) - {}", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -175,7 +175,7 @@ pub fn launch_with_props<T: 'static>(
|
||||
/// }
|
||||
/// ```
|
||||
pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_props: T, cfg: Config) {
|
||||
log::info!("Starting up");
|
||||
tracing::info!("Starting up");
|
||||
|
||||
let mut dom = VirtualDom::new_with_props(root, root_props);
|
||||
|
||||
@@ -210,7 +210,7 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
|
||||
let mut websys_dom = dom::WebsysDom::new(cfg, tx);
|
||||
|
||||
log::info!("rebuilding app");
|
||||
tracing::info!("rebuilding app");
|
||||
|
||||
if should_hydrate {
|
||||
#[cfg(feature = "hydrate")]
|
||||
@@ -222,7 +222,7 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
websys_dom.load_templates(&templates);
|
||||
|
||||
if let Err(err) = websys_dom.rehydrate(&dom) {
|
||||
log::error!(
|
||||
tracing::error!(
|
||||
"Rehydration failed {:?}. Rebuild DOM into element from scratch",
|
||||
&err
|
||||
);
|
||||
@@ -245,7 +245,7 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
websys_dom.mount();
|
||||
|
||||
loop {
|
||||
log::trace!("waiting for work");
|
||||
tracing::trace!("waiting for work");
|
||||
|
||||
// if virtualdom has nothing, wait for it to have something before requesting idle time
|
||||
// if there is work then this future resolves immediately.
|
||||
|
||||
@@ -114,9 +114,9 @@ impl WebsysDom {
|
||||
node: &TemplateNode,
|
||||
last_node_was_static_text: &mut bool,
|
||||
) -> Result<(), RehydrationError> {
|
||||
log::trace!("rehydrate template node: {:?}", node);
|
||||
tracing::trace!("rehydrate template node: {:?}", node);
|
||||
if let Ok(current_child) = current_child {
|
||||
if log::log_enabled!(log::Level::Trace) {
|
||||
if tracing::event_enabled!(tracing::Level::TRACE) {
|
||||
web_sys::console::log_1(¤t_child.clone().into());
|
||||
}
|
||||
}
|
||||
@@ -203,9 +203,9 @@ impl WebsysDom {
|
||||
dynamic: &DynamicNode,
|
||||
last_node_was_static_text: &mut bool,
|
||||
) -> Result<(), RehydrationError> {
|
||||
log::trace!("rehydrate dynamic node: {:?}", dynamic);
|
||||
tracing::trace!("rehydrate dynamic node: {:?}", dynamic);
|
||||
if let Ok(current_child) = current_child {
|
||||
if log::log_enabled!(log::Level::Trace) {
|
||||
if tracing::event_enabled!(tracing::Level::TRACE) {
|
||||
web_sys::console::log_1(¤t_child.clone().into());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user