title: Using console.log() in Electron app
body: <p>How can I log data or messages to the console in my Electron app?</p>
  
  <p>This really basic hello world opens the dev tools by default, by I am unable to use <code>console.log('hi')</code>. Is there an alternative for Electron?</p>
  
  <p><strong>main.js</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>var app = require('app');
  var BrowserWindow = require('browser-window');
  
  require('crash-reporter').start();
  
  var mainWindow = null;
  
  app.on('window-all-closed', function() {
    // Mac OS X - close is done explicitly with Cmd + Q, not just closing windows
    if (process.platform != 'darwin') {
      app.quit();
    }
  });
  
  app.on('ready', function(){
    mainWindow = new BrowserWindow({ width: 800, height: 600});
  
    mainWindow.loadUrl('file://' + __dirname + '/index.html');
  
    mainWindow.openDevTools();
  
    mainWindow.on('closed', function(){
      mainWindow = null;
    });
  });
  </code></pre>