I've got a standard electron app (based off of electron-prebuilt) that ought to be writing to std out with the following command: (in my project's main.js)
process.stdout.write('stdout write test')
when I launch the app from powershell and redirect the output to a txt file, I see the string displayed in the terminal window as expected:
> .\App.exe > log.txt
stdout write test
but when I open log.txt it's a blank file. what am I missing?
edit: to clarify Ansgar Wiechers' correct answer: in the windows command prompt, I needed to run the following command:
set ELECTRON_NO_ATTACH_CONSOLE=true
This results in console.log
and process.stdout.write
being directed to windows' stdout stream.