title: Logging variable in nodejs
body: <p>I have a variable named, 'res'. This variable if used with <code>console.log()</code> print all request to a function. My question is... How to log this variable in a log.txt file? </p>
  
  <p>Example using <code>console.log(res)</code></p>
  
  <p>Print in console:</p>
  
  <pre><code>[ 'AndroidShareANE',
    'pixi.js',
    'ShortSword',
    'faceshiftparser',
    'clmutils',
    'chaikin-smooth',
    'getuservideo',
    'getboundingbox',
    'clmdraw',
    'SpriteSheetScrubberTutorial',
    'interpolation-arrays',
  </code></pre>
  
  <p>This is a one part of response.</p>
  
  <p>My purpose is log in <code>log.txt</code> file the <code>var</code> content. Identical to <code>console.log()</code> result.</p>
  
  <p>Thanks for your collaboration, and sorry my bad english.</p>