mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-15 15:32:21 +08:00
Refactor logging to use a centralized logging utility across the application (#5277)
- Replaced direct log calls with a new logging macro that includes a logging type for better categorization. - Updated logging in various modules including `merge.rs`, `mod.rs`, `tun.rs`, `clash.rs`, `profile.rs`, `proxy.rs`, `window.rs`, `lightweight.rs`, `guard.rs`, `autostart.rs`, `dirs.rs`, `dns.rs`, `scheme.rs`, `server.rs`, and `window_manager.rs`. - Introduced logging types such as `Core`, `Network`, `ProxyMode`, `Window`, `Lightweight`, `Service`, and `File` to enhance log clarity and filtering.
This commit is contained in:
@@ -11,7 +11,7 @@ use crate::{
|
||||
};
|
||||
|
||||
pub(super) async fn resolve_scheme(param: &str) -> Result<()> {
|
||||
log::info!(target:"app", "received deep link: {param}");
|
||||
logging!(info, Type::Config, "received deep link: {param}");
|
||||
|
||||
let param_str = if param.starts_with("[") && param.len() > 4 {
|
||||
param
|
||||
@@ -50,8 +50,8 @@ pub(super) async fn resolve_scheme(param: &str) -> Result<()> {
|
||||
|
||||
match url_param {
|
||||
Some(ref url) => {
|
||||
log::info!(target:"app", "decoded subscription url: {url}");
|
||||
match PrfItem::from_url(url, name, None, None).await {
|
||||
logging!(info, Type::Config, "decoded subscription url: {url}");
|
||||
match PrfItem::from_url(url.as_ref(), name, None, None).await {
|
||||
Ok(mut item) => {
|
||||
let uid = match item.uid.clone() {
|
||||
Some(uid) => uid,
|
||||
|
||||
Reference in New Issue
Block a user