From 8c99f41b9076d0522b2c3da3f3719a8709259f91 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 4 May 2023 10:40:00 -0800 Subject: [PATCH] Fix parent process log level --- src/node/wrapper.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/node/wrapper.ts b/src/node/wrapper.ts index 82a7053bd..7cc30eef8 100644 --- a/src/node/wrapper.ts +++ b/src/node/wrapper.ts @@ -172,6 +172,7 @@ export class ChildProcess extends Process { * Initiate the handshake and wait for a response from the parent. */ public async handshake(): Promise { + this.logger.debug("initiating handshake") this.send({ type: "handshake" }) const message = await onMessage( process, @@ -280,6 +281,10 @@ export class ParentProcess extends Process { } public start(args: DefaultedArgs): Promise { + // Our logger was created before we parsed CLI arguments so update the level + // in case it has changed. + this.logger.level = logger.level + // Store for relaunches. this.args = args if (!this.started) { @@ -306,7 +311,7 @@ export class ParentProcess extends Process { }) } - this.logger.debug(`spawned inner process ${child.pid}`) + this.logger.debug(`spawned child process ${child.pid}`) await this.handshake(child)