title: Saving JavaScript `console.log` to global variable or file
body: <p>I want to access <code>console.log</code> data programmatically and so I need to implement a <code>console.log</code> which stores its data in a global variable or file.</p>
  
  <p>Can anyone tell me how to do this?</p>