feat(launcher): include client logs in diagnostics and format exit codes
Export the active client's wto_ws.log, latest .clog (bounded to 16 MiB), and a client-logs/summary.json metadata snapshot in diagnostics ZIPs without touching player saves. Log build completion, game launch arguments, PID, runtime duration, and hex-annotated Windows NTSTATUS/HRESULT exit codes in the launcher log and status bar. Checked: root typecheck, launcher typecheck, launcher electron-vite build, and exit code formatter runtime check.
This commit is contained in:
1 parent
1c24adbd83
commit
cab73f92f9
5 files changed
+184
-6
No files matched your search
@@ -9,6 +9,12 @@ const GameExitSchema = z.object({
|
||||
|
||||
export type GameExit = z.output<typeof GameExitSchema>;
|
||||
|
||||
/** Append the unsigned 32-bit hex form for Windows NTSTATUS/HRESULT exit codes. */
|
||||
export function formatExitCode(code: number): string {
|
||||
if (code >= 0 && code <= 0xffff) return String(code);
|
||||
return `${code} (0x${(code >>> 0).toString(16).toUpperCase().padStart(8, '0')})`;
|
||||
}
|
||||
|
||||
export const LaunchStateSchema = z.object({
|
||||
phase: z.enum([
|
||||
'ready', 'checking', 'building', 'starting-server', 'starting-game', 'running',
|
||||
|
||||
Reference in new issue
Block a user