mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
chore: remove monitor debug logs and add log clear action
This commit is contained in:
@@ -972,6 +972,17 @@ function registerIpcHandlers() {
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.handle('log:clear', async () => {
|
||||
try {
|
||||
const logPath = join(app.getPath('userData'), 'logs', 'wcdb.log')
|
||||
await mkdir(dirname(logPath), { recursive: true })
|
||||
await writeFile(logPath, '', 'utf8')
|
||||
return { success: true }
|
||||
} catch (e) {
|
||||
return { success: false, error: String(e) }
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.handle('diagnostics:getExportCardLogs', async (_, options?: { limit?: number }) => {
|
||||
return exportCardDiagnosticsService.snapshot(options?.limit)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user