1.0.2 • Published 3 years ago

@zppack/log v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

@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