mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-27 16:00:09 +08:00
feat(logging): introduce clash-verge-logging crate for management (#5486)
* feat(logging): introduce clash-verge-logging crate for management - Added a new crate `clash-verge-logging` with dependencies on `log`, `tokio`, `compact_str`, and `flexi_logger`. - Implemented logging types and macros for structured logging across the application. - Replaced existing logging imports with the new `clash_verge_logging` crate in various modules. - Updated logging functionality to support different logging types and error handling. - Refactored code to improve logging consistency and maintainability. * fix(logging): update import paths for clash_verge_logging in linux.rs and dns.rs * fix(logging): update import statement for clash_verge_logging in windows.rs
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
use crate::{
|
||||
config::{Config, IVerge},
|
||||
core::backup,
|
||||
logging,
|
||||
process::AsyncHandler,
|
||||
utils::{
|
||||
dirs::{PathBufExec as _, app_home_dir, local_backup_dir, verge_path},
|
||||
help,
|
||||
logging::Type,
|
||||
},
|
||||
};
|
||||
use anyhow::{Result, anyhow};
|
||||
use chrono::Utc;
|
||||
use clash_verge_logging::{Type, logging};
|
||||
use reqwest_dav::list_cmd::ListFile;
|
||||
use serde::Serialize;
|
||||
use smartstring::alias::String;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::{
|
||||
config::Config,
|
||||
core::{CoreManager, handle, tray},
|
||||
logging, logging_error,
|
||||
process::AsyncHandler,
|
||||
utils::{self, logging::Type, resolve},
|
||||
utils::{self, resolve},
|
||||
};
|
||||
use clash_verge_logging::{Type, logging, logging_error};
|
||||
use serde_yaml_ng::{Mapping, Value};
|
||||
use smartstring::alias::String;
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use crate::{
|
||||
config::{Config, IVerge},
|
||||
core::{CoreManager, handle, hotkey, sysopt, tray},
|
||||
logging, logging_error,
|
||||
module::{auto_backup::AutoBackupManager, lightweight},
|
||||
utils::logging::Type,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use clash_verge_logging::{Type, logging, logging_error};
|
||||
use draft::SharedBox;
|
||||
use serde_yaml_ng::Mapping;
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@ use crate::{
|
||||
cmd,
|
||||
config::{Config, PrfItem, PrfOption, profiles::profiles_draft_update_item_safe},
|
||||
core::{CoreManager, handle, tray},
|
||||
logging, logging_error,
|
||||
utils::logging::Type,
|
||||
};
|
||||
use anyhow::{Result, bail};
|
||||
use clash_verge_logging::{Type, logging, logging_error};
|
||||
use smartstring::alias::String;
|
||||
use tauri::Emitter as _;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
use crate::{
|
||||
config::{Config, IVerge},
|
||||
core::handle,
|
||||
logging,
|
||||
utils::logging::Type,
|
||||
};
|
||||
use clash_verge_logging::{Type, logging};
|
||||
use std::env;
|
||||
use tauri_plugin_clipboard_manager::ClipboardExt as _;
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::config::Config;
|
||||
use crate::core::{CoreManager, handle, sysopt};
|
||||
use crate::module::lightweight;
|
||||
use crate::utils;
|
||||
use crate::utils::window_manager::WindowManager;
|
||||
use crate::{logging, module::lightweight, utils::logging::Type};
|
||||
use clash_verge_logging::{Type, logging};
|
||||
|
||||
/// Public API: open or close the dashboard
|
||||
pub async fn open_or_close_dashboard() {
|
||||
|
||||
Reference in New Issue
Block a user