Switch to tracing for the cli (#2137)
* switch to tracing in the dioxus-cli * bump manganis * fix manganis features * only print processing assets if skip assets is disabled * switch all logs to tracing * switch to published version of manganis * undo all changes to cargo.toml * remove reference to log
This commit is contained in:
1 parent
da3b066934
commit
2ac4bdb673
19 files changed
+365
-416
No files matched your search
@@ -68,7 +68,7 @@ impl PluginManager {
|
||||
let path = PathBuf::from(i);
|
||||
if !path.is_dir() {
|
||||
// for loader dir, we need check first, because we need give a error log.
|
||||
log::error!("Plugin loader: {:?} path is not a exists directory.", path);
|
||||
tracing::error!("Plugin loader: {:?} path is not a exists directory.", path);
|
||||
}
|
||||
path_list.push((path, true));
|
||||
}
|
||||
@@ -97,7 +97,7 @@ impl PluginManager {
|
||||
&& !from_loader
|
||||
{
|
||||
// found same name plugin, intercept load
|
||||
log::warn!(
|
||||
tracing::warn!(
|
||||
"Plugin {} has been intercepted. [mulit-load]",
|
||||
info.name
|
||||
);
|
||||
@@ -139,12 +139,12 @@ impl PluginManager {
|
||||
}
|
||||
}
|
||||
Ok(false) => {
|
||||
log::warn!(
|
||||
tracing::warn!(
|
||||
"Plugin init function result is `false`, init failed."
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
log::warn!("Plugin init failed: {e}");
|
||||
tracing::warn!("Plugin init failed: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ impl PluginManager {
|
||||
}
|
||||
Err(_e) => {
|
||||
let dir_name = plugin_dir.file_name().unwrap().to_str().unwrap();
|
||||
log::error!("Plugin '{dir_name}' load failed.");
|
||||
tracing::error!("Plugin '{dir_name}' load failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,10 +287,10 @@ impl PluginManager {
|
||||
let app_path = app_path();
|
||||
let plugin_path = app_path.join("plugins");
|
||||
if !plugin_path.is_dir() {
|
||||
log::info!("📖 Start to init plugin library ...");
|
||||
tracing::info!("📖 Start to init plugin library ...");
|
||||
let url = "https://github.com/DioxusLabs/cli-plugin-library";
|
||||
if let Err(err) = clone_repo(&plugin_path, url) {
|
||||
log::error!("Failed to init plugin dir, error caused by {}. ", err);
|
||||
tracing::error!("Failed to init plugin dir, error caused by {}. ", err);
|
||||
}
|
||||
}
|
||||
plugin_path
|
||||
|
||||
Reference in new issue
Block a user