Files
paseo/packages/desktop/src/diagnostics/app-logs.ts
T
Mohamed BoudraandGitHub f21c997b17 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
2026-07-06 17:50:45 +02:00

18 lines
410 B
TypeScript

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 }),
};
}