Skip to content

Instantly share code, notes, and snippets.

View logging.js
var Logger = function(enable, prefix) {
this.log = {};
if ((typeof globalEnableLogger !== 'undefined' && globalEnableLogger == false) || enable == false) {
for(var m in console) {
if(typeof console[m] == 'function') {
this.log[m] = function(){};
}
}
} else if (enable && typeof enable === 'string') {
for (var m in console) {