Posted By

andyr on 03/05/11


Tagged


Versions (?)

Console Logger


 / Published in: JavaScript
 

  1. // usage: log('inside coolFunc',this,arguments);
  2. // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
  3. window.log = function(){
  4. log.history = log.history || []; // store logs to an array for reference
  5. log.history.push(arguments);
  6. if(this.console){
  7. console.log( Array.prototype.slice.call(arguments) );
  8. }
  9. };

Report this snippet  

You need to login to post a comment.