Skip to content

Commit 8c99f41

Browse files
committed
Fix parent process log level
1 parent e02d56d commit 8c99f41

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/node/wrapper.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export class ChildProcess extends Process {
172172
* Initiate the handshake and wait for a response from the parent.
173173
*/
174174
public async handshake(): Promise<DefaultedArgs> {
175+
this.logger.debug("initiating handshake")
175176
this.send({ type: "handshake" })
176177
const message = await onMessage<ParentMessage, ParentHandshakeMessage>(
177178
process,
@@ -280,6 +281,10 @@ export class ParentProcess extends Process {
280281
}
281282

282283
public start(args: DefaultedArgs): Promise<void> {
284+
// Our logger was created before we parsed CLI arguments so update the level
285+
// in case it has changed.
286+
this.logger.level = logger.level
287+
283288
// Store for relaunches.
284289
this.args = args
285290
if (!this.started) {
@@ -306,7 +311,7 @@ export class ParentProcess extends Process {
306311
})
307312
}
308313

309-
this.logger.debug(`spawned inner process ${child.pid}`)
314+
this.logger.debug(`spawned child process ${child.pid}`)
310315

311316
await this.handshake(child)
312317

0 commit comments

Comments
 (0)