1.0.2 • Published 5 years ago
@zppack/log v1.0.2
@zppack/log
A log tool in console with 4 levels.
Features
- colors log using chalk
- 4 log levels
- debug mode support
Start
Install
npm install --save @zppack/logUsage
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.
