瀏覽代碼

use tracing in new logs

Evan Almloff 1 年之前
父節點
當前提交
6fab8963e6
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      packages/desktop/Cargo.toml
  2. 1 1
      packages/desktop/src/protocol.rs
  3. 1 1
      packages/desktop/src/webview.rs

+ 1 - 1
packages/desktop/Cargo.toml

@@ -19,7 +19,7 @@ serde = "1.0.136"
 serde_json = "1.0.79"
 thiserror = { workspace = true }
 wry = { version = "0.28.0", default-features = false, features = ["protocol", "file-drop"] }
-tracing = { workspace = true }
+tracing.workspace = true
 futures-channel = { workspace = true }
 tokio = { workspace = true, features = [
     "sync",

+ 1 - 1
packages/desktop/src/protocol.rs

@@ -107,7 +107,7 @@ pub(super) fn desktop_handler(
                     if let Some(assets_head) = assets_head {
                         head += &assets_head;
                     } else {
-                        log::warn!("No assets head found. You can compile assets with the dioxus-cli in release mode");
+                        trace::warn!("No assets head found. You can compile assets with the dioxus-cli in release mode");
                     }
                 }
 

+ 1 - 1
packages/desktop/src/webview.rs

@@ -52,7 +52,7 @@ pub fn build(
             match std::fs::read_to_string(&head) {
                 Ok(s) => Some(s),
                 Err(err) => {
-                    log::error!("Failed to read {head:?}: {err}");
+                    trace::error!("Failed to read {head:?}: {err}");
                     None
                 }
             }