console-util
v1.0.1
Published
a console util
Downloads
3
Readme
console-util
封装window.console
使用
- 添加项目依赖
npm install console-util
- 具体使用
let log = new LogUtil();
//设置默认等级
let level = 'info';
//使用等级
log.setLevel(level);
log.runLog('warn', 'init', 'this is warn log');
log.runLog('info', 'init', 'this is info log');
log.runLog('debug', 'init', 'this is debug log');
log.runLog('error', 'init', 'this is error log');