From 8369de53ba23d4b34e473455edeb27033ee627da Mon Sep 17 00:00:00 2001 From: modeco80 Date: Sun, 23 Jun 2024 02:56:17 -0400 Subject: [PATCH] qemu: log QEMU stderr as logger messages Mostly for nicity, but also to make debugging start errors an actual possibility. --- qemu/src/QemuVM.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu/src/QemuVM.ts b/qemu/src/QemuVM.ts index 27c6704..032f018 100644 --- a/qemu/src/QemuVM.ts +++ b/qemu/src/QemuVM.ts @@ -178,6 +178,10 @@ export class QemuVM extends EventEmitter { // Start QEMU this.qemuProcess = execaCommand(split); + this.qemuProcess.stderr?.on('data', (data) => { + self.VMLog().Error("QEMU stderr: {0}", data.toString('utf8')); + }) + this.qemuProcess.on('spawn', async () => { self.VMLog().Info("QEMU started"); await Shared.Sleep(500);