Skip to content

Commit

Permalink
Fix parent process log level
Browse files Browse the repository at this point in the history
  • Loading branch information
code-asher committed May 4, 2023
1 parent e02d56d commit 8c99f41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/node/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export class ChildProcess extends Process {
* Initiate the handshake and wait for a response from the parent.
*/
public async handshake(): Promise<DefaultedArgs> {
this.logger.debug("initiating handshake")
this.send({ type: "handshake" })
const message = await onMessage<ParentMessage, ParentHandshakeMessage>(
process,
Expand Down Expand Up @@ -280,6 +281,10 @@ export class ParentProcess extends Process {
}

public start(args: DefaultedArgs): Promise<void> {
// 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) {
Expand All @@ -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)

Expand Down

0 comments on commit 8c99f41

Please sign in to comment.