Skip to content

Instantly share code, notes, and snippets.

@doomhz
Created May 26, 2013 15:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doomhz/5653152 to your computer and use it in GitHub Desktop.
Save doomhz/5653152 to your computer and use it in GitHub Desktop.
Replace the browser console with JSLogger.
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);};
}
}
@ldijkman
Copy link

ldijkman commented Oct 31, 2023

looks like interesting code
do not understand it yet
and how to use it

https://codepen.io/ldijkman/pen/LYqpBPW

Screenshot from 2023-10-29 09-31-30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment