# @zppack/log

> A log tool in console with 4 levels.

Latest version **1.0.2** (published 2021-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zppack/log
pnpm add @zppack/log
yarn add @zppack/log
bun add @zppack/log
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-03-24 |
| First published | 2021-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Chan |
| Maintainers | johnch |
| Keywords | log, debug |

## Links

- npm: https://www.npmjs.com/package/@zppack/log
- Repository: ssh+git://git@github.com/zppack/log
- Homepage: https://github.com/zppack/log
- Issues: https://github.com/zppack/log/issues
- npm.io page: https://npm.io/package/@zppack/log

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-03-24
- 1.0.1 — 2021-03-24
- 1.0.0 — 2021-03-24

## README

# @zppack/log

A log tool in console with 4 levels.

[![NPM](https://nodei.co/npm/@zppack/log.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/@zppack/log/)

## Features

- [x] colors log using chalk
- [x] 4 log levels
- [x] debug mode support

## Start

### Install

```sh
npm install --save @zppack/log
```

### Usage

```js
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?](CONTRIBUTING.md)

## Recently changes

See the [change log](CHANGELOG.md).

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/@zppack/log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
