title: PhantomJS / Javascript: write to file instead of to console
body: <p>From PhantomJS, how do I write to a log instead of to the console?</p>
  
  <p>In the examples <a href="https://github.com/ariya/phantomjs/wiki/Examples">https://github.com/ariya/phantomjs/wiki/Examples</a>, it always (in the ones I have looked at) says something like:</p>
  
  <pre><code>console.log('some stuff I wrote');
  </code></pre>
  
  <p>This is not so useful.</p>