Last active
September 28, 2015 09:00
-
-
Save iahu/7efcec628f7d8737e3e4 to your computer and use it in GitHub Desktop.
js console wrapper,can print original call code line number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log = (function () { | |
if ( console && typeof console.log === 'function' ) { | |
if (console.log.bind) { | |
return console.log.bind(console); | |
} else { | |
return $.proxy(console.log, console); | |
} | |
} else { | |
return function () { | |
var log = window.__im_log = window.__im_log || []; | |
log.push( Array.prototype.join.call(arguments, ' ') ); | |
}; | |
} | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment