fix log level

This commit is contained in:
pompurin404 2024-09-30 09:12:35 +08:00
parent 0de454fc25
commit ecdd5ae88d
No known key found for this signature in database

View File

@ -280,7 +280,8 @@ export const stopMihomoLogs = async (): Promise<void> => {
const mihomoLogs = async (): Promise<void> => {
stopMihomoLogs()
mihomoLogsWs = await mihomoWs('/logs')
const { 'log-level': logLevel } = await getControledMihomoConfig()
mihomoLogsWs = await mihomoWs(`/logs?level=${logLevel}`)
mihomoLogsWs.on('data', (data) => {
try {
const json = JSON.parse(trimJson(data.toString())) as IMihomoLogInfo