Before I start describing the problem, do not point me to Using console.log() in Electron app. Now, let's proceed.I'm trying to show messages on the console, these messages are coming from the main process. Here's a sample code:index.js:console.log('LOGGING'); console.error('ERROR'); console.info('INFO'); console.warn('WARNING'); process.stdout.write('WRITE'); If I run this as node index.js, I can see all the messages on my console. But if I do electron . then nothing is shown on the console. To be more precise, I'm running this using CMD and Powershell, and both have this problem. If I use git-bash, then no problem at all, all is well.Things I've tried:Setting ELECTRON_ENABLE_LOGGING=1 doesn't do anything.As shown in the code process.stdout.write('WRITE'); doesn't do anything either.Running electron --enable-logging . doesn't show anything either.I've used PowerShell, CMD, ConEmu (which just runs CMD or PowerShell) and nothing works.I could create a BrowserWindow and send my messages via IPC to the renderer process to be displayed in the browser console, but I really don't want to do this.I'm aware of the module electron-log but I rather use the module debug which is based on console.* If nobody has a better idea on how to make it work. I'll probably use electron-logIdeas of what I can do?
Submitted July 11, 2018 at 01:02AM by fcastillo
No comments:
Post a Comment