Created
May 26, 2013 15:43
-
-
Save doomhz/5653152 to your computer and use it in GitHub Desktop.
Replace the browser console with JSLogger.
This file contains hidden or 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
if (jslogger) { | |
if(!window.console) window.console = {}; | |
var methods = ["log", "debug", "warn", "info"]; | |
for(var i=0;i<methods.length;i++){ | |
console[methods[i]] = function(){jslogger.log.apply(jslogger, arguments);}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
looks like interesting code
do not understand it yet
and how to use it
https://codepen.io/ldijkman/pen/LYqpBPW