console-util

1.0.1 • Public • Published

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');

Package Sidebar

Install

npm i console-util

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.68 kB

Total Files

7

Last publish

Collaborators

  • ahwgs