@zppack/log

1.0.2 • Public • Published

@zppack/log

A log tool in console with 4 levels.

NPM

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

How to contribute to this?

Recently changes

See the change log.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @zppack/log

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

5.15 kB

Total Files

5

Last publish

Collaborators

  • johnch