tasks/jasmine-chromeapp/log.js
function captureLogs() {
  'use strict';
  console.log('Now capturing logs');
  var methods = [ 'debug', 'info', 'log', 'warn', 'error' ];
  methods.forEach(function (mthd) {
    var realMethod = 'real' + mthd,
      report = captureLog.bind({}, mthd);
    console[realMethod] = console[mthd];
    console[mthd] = function () {
      report(arguments);
      console.reallog.apply(console, arguments);
    };
  });
}
function captureLogs() {
  'use strict';
  console.log('Now capturing logs');
  var methods = [ 'debug', 'info', 'log', 'warn', 'error' ];
  methods.forEach(function (mthd) {
    var realMethod = 'real' + mthd,
      report = captureLog.bind({}, mthd);
    console[realMethod] = console[mthd];
    console[mthd] = function () {
      report(arguments);
      console.reallog.apply(console, arguments);
    };
  });
}
function captureLogs ( ) { 'use strict' ; console . log ( 'Now capturing logs' ) ; var methods = [ 'debug' , 'info' , 'log' , 'warn' , 'error' ] ; methods . forEach ( function ( mthd ) { var realMethod = 'real' + mthd , report = captureLog . bind ( { } , mthd ) ; console [ realMethod ] = console [ mthd ] ; console [ mthd ] = function ( ) { report ( arguments ) ; console . reallog . apply ( console , arguments ) ; } ; } ) ; }
This will intercept logs and get their output back to the shell.
This will intercept logs and get their output back to the shell .