Include desktop app logs in diagnostics (#1914)

* fix(diagnostics): include desktop app logs

Settings diagnostics now collect the Electron main-process log separately from daemon.log so desktop startup and environment-probe failures are included in app reports.

* refactor(desktop): share log tail reader

* fix(diagnostics): surface desktop app log read errors

* refactor(diagnostics): tighten desktop report API
This commit is contained in:
Mohamed Boudra
2026-07-06 17:50:45 +02:00
committed by GitHub
parent 7c1da0077b
commit f21c997b17
10 changed files with 322 additions and 48 deletions
@@ -0,0 +1,17 @@
import log from "electron-log/main";
import { tailFile } from "./tail-file.js";
const APP_LOG_TAIL_LINES = 100;
export interface DesktopAppLogs {
logPath: string;
contents: string;
}
export function getDesktopAppLogs(): DesktopAppLogs {
const logPath = log.transports.file.getFile().path;
return {
logPath,
contents: tailFile(logPath, APP_LOG_TAIL_LINES, { throwOnReadError: true }),
};
}