refactor(logger): replace ClashLogger with CLASH_LOGGER and update log handling; improve log retrieval and management

This commit is contained in:
Tunglies
2025-10-29 17:58:02 +08:00
parent 2e9f6dd174
commit f4de4738f1
8 changed files with 120 additions and 96 deletions

View File

@@ -8,7 +8,6 @@ use clash_verge_service_ipc::CoreConfig;
use compact_str::CompactString;
use once_cell::sync::Lazy;
use std::{
collections::VecDeque,
env::current_exe,
path::{Path, PathBuf},
process::Command as StdCommand,
@@ -394,7 +393,7 @@ pub(super) async fn run_core_by_service(config_file: &PathBuf) -> Result<()> {
start_with_existing_service(config_file).await
}
pub(super) async fn get_clash_logs_by_service() -> Result<VecDeque<CompactString>> {
pub(super) async fn get_clash_logs_by_service() -> Result<Vec<CompactString>> {
logging!(info, Type::Service, "正在获取服务模式下的 Clash 日志");
let response = clash_verge_service_ipc::get_clash_logs()