Skip to content

The rendering process will print the logs of the main process twice, in the utilityProcess.on('message ') of Electorn #470

@BukJiang

Description

@BukJiang

[Main Process]

this.utilityProcess.on('message', (message: any) => {
  const { event, data } = message
  switch (event) {
    case 'LOG':
      return console.log('[Socket]', ...data)
    case 'ERROR':
      return console.error('[Socket]', ...data)
  }
}) 

[Renderer Process]

Finally, the hooks of 'electron-log/reducer' were blocked

logger.hooks.push((message) => {
  if (message.variables.processType === 'main') {
    return false
  }
  // do something ...
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions