title: How to capture the stdout stream of an electron application in windows?
body: <p>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)</p>
  
  <pre><code>process.stdout.write('stdout write test')
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>&gt; .\App.exe &gt; log.txt
  </code></pre>
  
  <blockquote>
    <p>stdout write test</p>
  </blockquote>
  
  <p>but when I open log.txt it's a blank file. what am I missing?</p>
  
  <p><strong>edit</strong>: to clarify Ansgar Wiechers' correct answer: in the windows command prompt, I needed to run the following command:</p>
  
  <pre><code>set ELECTRON_NO_ATTACH_CONSOLE=true
  </code></pre>
  
  <p>This results in <code>console.log</code> <em>and</em> <code>process.stdout.write</code> being directed to windows' stdout stream.</p>