title: How to output client console.log in CasperJS?
body: <p>I am using CasperJS to capture the log of browser console, but it does not work.</p>
  
  <pre><code>var casper = require('casper').create({
    logLevel: "debug"
  });
  
  var domain, port, userName, designID, token, outPath, reportUrl, explorerUrl, sourcePage;
  var images = [];
  
  if(casper.cli.has(5)){
    // Get argvs
    domain = casper.cli.get(0).toLowerCase();
    port = casper.cli.get(1);
    userName = casper.cli.get(2);
    designID = casper.cli.get(3);
    token = casper.cli.get(4);
    outPath = casper.cli.get(5);
  }
  
  reportUrl = 'http://' + domain + ':' + port + '/design?file_id=' + designID;
  
  casper.on('remote.message', function(message) {
    this.log('remote message caught: ' + message);
  });
  
  casper.start(reportUrl, function() {
    this.evaluate(function sendLog(log) {
      // you can access the log from page DOM
      console.log('from the browser, I can tell you there are ' + 
      log.length + ' entries in the log');
    }, this.result.log);
  });
  
  casper.run();
  </code></pre>
  
  <p>In Chrome, the page will output some log like:</p>
  
  <pre><code>get userdata
  get designdata
  Success!
  </code></pre>
  
  <p>But in CasperJS, it does not output any log.</p>