(
exit: { code: number | null; signal: NodeJS.Signals | null },
logPath: string,
)
| 369 | } |
| 370 | |
| 371 | function formatDaemonBootFailure( |
| 372 | exit: { code: number | null; signal: NodeJS.Signals | null }, |
| 373 | logPath: string, |
| 374 | ): string { |
| 375 | const reason = |
| 376 | exit.signal === null |
| 377 | ? `exited with code ${String(exit.code)}` |
| 378 | : `was terminated by signal ${exit.signal}`; |
| 379 | return `Kimi server daemon ${reason} during startup.\n\n${formatLogTail(logPath)}`; |
| 380 | } |
| 381 | |
| 382 | function formatLogTail(logPath: string): string { |
| 383 | const tail = tailFile(logPath, 30); |
no test coverage detected