core: allow debug level (#391)

This commit is contained in:
qianlongzt 2024-12-01 06:20:41 +08:00 committed by GitHub
parent 09921d984a
commit 182f2375f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,10 @@ export async function generateProfile(): Promise<void> {
const controledMihomoConfig = await getControledMihomoConfig() const controledMihomoConfig = await getControledMihomoConfig()
const profile = deepMerge(currentProfile, controledMihomoConfig) const profile = deepMerge(currentProfile, controledMihomoConfig)
// 确保可以拿到基础日志信息 // 确保可以拿到基础日志信息
profile['log-level'] = 'info' // 使用 debug 可以调试内核相关问题 `debug/pprof`
if (['info', 'debug'].includes(profile['log-level']) === false) {
profile['log-level'] = 'info'
}
runtimeConfig = profile runtimeConfig = profile
runtimeConfigStr = yaml.stringify(profile) runtimeConfigStr = yaml.stringify(profile)
if (diffWorkDir) { if (diffWorkDir) {