process.stdout.write vs console.log for crash log persistence
Choosing between synchronous process.stdout.write and asynchronous console.log for crash diagnostics In containerized deployments the output stream is usually a pipe, so console.log buffers writes asynchronously. If the process crashes — for example from an OOM kill or an unhandled exception — the final stack trace can stay in the buffer and never reach the