mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
Refactor logging macros to remove print control parameter
- Updated logging macros to eliminate the boolean parameter for print control, simplifying the logging calls throughout the codebase. - Adjusted all logging calls in various modules (lib.rs, lightweight.rs, help.rs, init.rs, logging.rs, resolve/mod.rs, resolve/scheme.rs, resolve/ui.rs, resolve/window.rs, server.rs, singleton.rs, window_manager.rs) to reflect the new macro structure. - Ensured consistent logging behavior across the application by standardizing the logging format.
This commit is contained in:
@@ -230,7 +230,12 @@ impl Sysopt {
|
||||
pub async fn update_launch(&self) -> Result<()> {
|
||||
let enable_auto_launch = { Config::verge().await.latest_ref().enable_auto_launch };
|
||||
let is_enable = enable_auto_launch.unwrap_or(false);
|
||||
logging!(info, true, "Setting auto-launch state to: {:?}", is_enable);
|
||||
logging!(
|
||||
info,
|
||||
Type::System,
|
||||
"Setting auto-launch state to: {:?}",
|
||||
is_enable
|
||||
);
|
||||
|
||||
// 首先尝试使用快捷方式方法
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -266,9 +271,9 @@ impl Sysopt {
|
||||
let autostart_manager = app_handle.autolaunch();
|
||||
|
||||
if is_enable {
|
||||
logging_error!(Type::System, true, "{:?}", autostart_manager.enable());
|
||||
logging_error!(Type::System, "{:?}", autostart_manager.enable());
|
||||
} else {
|
||||
logging_error!(Type::System, true, "{:?}", autostart_manager.disable());
|
||||
logging_error!(Type::System, "{:?}", autostart_manager.disable());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user