mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: improve log rule
This commit is contained in:
@@ -2,7 +2,6 @@ use super::{Clash, Verge};
|
||||
use crate::{log_if_err, utils::sysopt::SysProxyConfig};
|
||||
use anyhow::{bail, Result};
|
||||
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
||||
// use parking_lot::Mutex;
|
||||
use std::sync::Arc;
|
||||
use tauri::{async_runtime::Mutex, utils::platform::current_exe};
|
||||
|
||||
@@ -46,7 +45,7 @@ impl Sysopt {
|
||||
|
||||
if enable {
|
||||
if let Err(err) = sysproxy.set_sys() {
|
||||
log::error!("failed to set system proxy for `{err}`");
|
||||
log::error!(target: "app", "failed to set system proxy for `{err}`");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +89,7 @@ impl Sysopt {
|
||||
if let Some(sysproxy) = self.old_sysproxy.take() {
|
||||
match sysproxy.set_sys() {
|
||||
Ok(_) => self.cur_sysproxy = None,
|
||||
Err(_) => log::error!("failed to reset proxy"),
|
||||
Err(_) => log::error!(target: "app", "failed to reset proxy"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +182,7 @@ impl Sysopt {
|
||||
break;
|
||||
}
|
||||
|
||||
log::debug!("try to guard the system proxy");
|
||||
log::debug!(target: "app", "try to guard the system proxy");
|
||||
|
||||
let clash = Clash::new();
|
||||
|
||||
@@ -194,7 +193,7 @@ impl Sysopt {
|
||||
|
||||
log_if_err!(sysproxy.set_sys());
|
||||
}
|
||||
None => log::error!("failed to parse clash port"),
|
||||
None => log::error!(target: "app", "failed to parse clash port"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user