npm.io
1.0.2 • Published 5 years ago

@zppack/log

Licence
MIT
Version
1.0.2
Deps
1
Size
5 kB
Vulns
0
Weekly
0

@zppack/log

A log tool in console with 4 levels.

NPM

Features

  • colors log using chalk
  • 4 log levels
  • 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

How to contribute to this?

Recently changes

See the change log.

License

MIT

Keywords