Add diagnostic logging to daemon startup
This commit is contained in:
@@ -355,6 +355,13 @@ async function startDaemon(): Promise<DesktopDaemonStatus> {
|
||||
daemonRunnerExecArgv: daemonRunner.execArgv,
|
||||
command: invocation.command,
|
||||
args: invocation.args,
|
||||
electronRunAsNode: invocation.env.ELECTRON_RUN_AS_NODE ?? null,
|
||||
parentExecPath: process.execPath,
|
||||
parentElectronRunAsNode: process.env.ELECTRON_RUN_AS_NODE ?? null,
|
||||
electronVersion: process.versions.electron ?? null,
|
||||
nodeVersion: process.versions.node,
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
});
|
||||
|
||||
const child: ChildProcess = spawnProcess(invocation.command, invocation.args, {
|
||||
@@ -409,13 +416,13 @@ async function startDaemon(): Promise<DesktopDaemonStatus> {
|
||||
logDesktopDaemonLifecycle("detached startup grace period completed", {
|
||||
childPid: child.pid ?? null,
|
||||
exitedEarly: result.exitedEarly,
|
||||
stdout: stdout.slice(0, 2000),
|
||||
stderr: stderr.slice(0, 2000),
|
||||
...(result.exitedEarly
|
||||
? {
|
||||
exitCode: result.code,
|
||||
signal: result.signal,
|
||||
error: result.error?.message ?? null,
|
||||
stdout: stdout.slice(0, 2000),
|
||||
stderr: stderr.slice(0, 2000),
|
||||
}
|
||||
: {}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user