title: Hook to console.log in electron
body: <p>I'm looking to hook to console.log in electron.<br>
  I tried following the steps as mentioned here: <a href="https://stackoverflow.com/a/9624028/2091948">https://stackoverflow.com/a/9624028/2091948</a><br>
  While the above works well in node.js, this same approach doesn't work in electron (which in-turn is node.js based)</p>
  
  <p>How can I achieve this in electron?<br>
  I need to capture all calls to console.log, and console.error, so that I can use the module <code>electron-log</code>(<a href="https://www.npmjs.com/package/electron-log" rel="nofollow noreferrer">https://www.npmjs.com/package/electron-log</a>) to hook to all console.log, and console.error calls.</p>