Use tracing::warn! instead of error! when assets not being preloaded (#2251)
* Use `tracing::warn!` instead of `error!` when assets not being preloaded Currently, it emits a `tracing::error` when assets not being preloaded if the dioxus CLI was not used to build the application. It should be a warning since `cargo` can also build the application successfully. * add more details to desktop preload warning --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
1 parent
7eccc7a104
commit
fcbebbbf14
1 file changed
+1
-1
@@ -86,7 +86,7 @@ fn assets_head() -> Option<String> {
|
||||
match std::fs::read_to_string(&head) {
|
||||
Ok(s) => Some(s),
|
||||
Err(err) => {
|
||||
tracing::error!("Failed to read {head:?}: {err}");
|
||||
tracing::warn!("Assets built with manganis cannot be preloaded (failed to read {head:?}). This warning may occur when you build a desktop application without the dioxus CLI. If you do not use manganis, you can ignore this warning: {err}.");
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user