refactor: 统一日志输出方式并移除冗余检查

*   移除 `src/utils/httpClient.ts` 中自定义的 `logToCF` 日志函数。
*   将 `src/core.ts` 中所有 `logToCF` 调用替换为 `console.log` 进行结构化日志输出。
*   删除 `src/platforms/gal/xxacg.ts` 中无匹配项但存在 HTML 的特定错误检查。
This commit is contained in:
Jurangren
2025-08-23 00:21:14 +08:00
parent 9afdee1cf6
commit 37f47f981a
3 changed files with 6 additions and 31 deletions

View File

@@ -38,23 +38,4 @@ export async function fetchClient(
} finally {
clearTimeout(timeoutId);
}
}
/**
* 向 Cloudflare 发送日志。
* @param data 要记录的数据对象。
*/
export async function logToCF(data: object) {
// 在此处添加 console.log以便在 Cloudflare 控制台也能看到日志
console.log(JSON.stringify(data));
try {
await fetch("https://log.gal.homes", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
} catch (error) {
console.error("Failed to log to Cloudflare:", error);
}
}