console.log = (function(oldLogFunc) {
return function() {
//showDebuggerLog 全局配置项
if (showDebuggerLog) {
oldLogFunc.apply(this, arguments);
}
};
})(console.log);
重写console.log,实现控制台打印信息可配置
最新推荐文章于 2024-07-12 16:27:40 发布
console.log = (function(oldLogFunc) {
return function() {
//showDebuggerLog 全局配置项
if (showDebuggerLog) {
oldLogFunc.apply(this, arguments);
}
};
})(console.log);