Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-log duplicates messages when used with webpack #143

Closed
smoofra opened this issue May 25, 2019 · 2 comments
Closed

electron-log duplicates messages when used with webpack #143

smoofra opened this issue May 25, 2019 · 2 comments

Comments

@smoofra
Copy link

smoofra commented May 25, 2019

electron-log will duplicate messages if you

  • use it with webpack

  • redirect console.log to it

See here for reproduction instructions and explanation.

https://github.com/smoofra/electron-log-require-bug

@megahertz
Copy link
Owner

megahertz commented May 25, 2019 via email

@megahertz
Copy link
Owner

The reason is rendererConsole transport. When you pack node_modules into a bundle, there is two instances of electron-log in a renderer process: one from the bundle and another from node_modules. In the v4 I'm going to rewrite this transport, so there will no such a problem. Now there are two workarounds:

  • disable rendererConsole transport
  • exclude electron-log from a bundle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants