@ray-js/log4js
v0.0.4
Published
小程序日志组件
Downloads
139
Readme
English | 简体中文
@ray-js/log4js
小程序日志组件
Installation
$ npm install @ray-js/log4js
# or
$ yarn add @ray-js/log4js
Usage
import log4js from '@ray-js/log4js';
// Set a log tag to make it easier to find
log4js.setTag('log4js');
// info log
log4js.info('info', { info: 'info' });
// warn log
log4js.warn('warn', { warn: 'warn' });
// performance log
log4js.performance('use time', 13);
// error log
log4js.error('error', { error: 'error' });
// info log is not written to the local log of the App
log4js.infoWithoutAppContext('info', { info: 'info' });
// warn log is not written to the local log of the App
log4js.warnWithoutAppContext('warn', { warn: 'warn' });
// performance log is not written to the local log of the App
log4js.performanceWithoutAppContext('use time', 13);
// error log is not written to the local log of the App
log4js.errorWithoutAppContext('error', { error: 'error' });