fix: allow all valid log levels in generated profile

This commit is contained in:
Memory
2026-05-25 20:29:16 +08:00
committed by GitHub
parent 1c10aa2333
commit e42adaad56

View File

@@ -149,9 +149,8 @@ export async function generateProfile(): Promise<string | undefined> {
addedProxyServerRouteExcludes
)
}
// 确保可以拿到基础日志信息
// 使用 debug 可以调试内核相关问题 `debug/pprof`
if (['info', 'debug'].includes(profile['log-level']) === false) {
if (!['info', 'debug', 'warning', 'error', 'silent'].includes(profile['log-level'])) {
profile['log-level'] = 'info'
}
// 删除空的局域网允许列表,避免局域网访问异常