@zppack/log
v1.0.2
Published
A log tool in console with 4 levels.
Downloads
8
Readme
@zppack/log
A log tool in console with 4 levels.
Features
- [x] colors log using chalk
- [x] 4 log levels
- [x] debug mode support
Start
Install
npm install --save @zppack/log
Usage
import log from '@zppack/log';
log.i('this is a info-level log');
log.info('this is also a info-level log');
APIs
log.info
Info-level log function. Shorted as log.i
.
log.warn
Warn-level log function. Shorted as log.w
.
log.error
Error-level log function. Shorted as log.e
.
log.debug
Debug log function. Shorted as log.d
.
Attention: Only works when there is an env variable process.env.DEBUG
or process.env.ZP_DEBUG
set to true.
Contributing
Recently changes
See the change log.