Skip to content

Commit

Permalink
core: allow debug level (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
qianlongzt authored Nov 30, 2024
1 parent 09921d9 commit 182f237
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/core/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export async function generateProfile(): Promise<void> {
const controledMihomoConfig = await getControledMihomoConfig()
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
runtimeConfigStr = yaml.stringify(profile)
if (diffWorkDir) {
Expand Down

0 comments on commit 182f237

Please sign in to comment.