# @kevinwang0316/log

> A helper to log with different level.

Latest version **1.0.1** (published 2019-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kevinwang0316/log
pnpm add @kevinwang0316/log
yarn add @kevinwang0316/log
bun add @kevinwang0316/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.1 |
| Published | 2019-01-29 |
| First published | 2019-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin W. |
| Maintainers | kevinwang0316 |
| Keywords | log |

## Links

- npm: https://www.npmjs.com/package/@kevinwang0316/log
- Repository: https://github.com/PengWang0316/Log
- Homepage: https://github.com/PengWang0316/Log#readme
- Issues: https://github.com/PengWang0316/Log/issues
- npm.io page: https://npm.io/package/@kevinwang0316/log

## 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.1 (latest) — 2019-01-29
- 1.0.0 — 2019-01-20

## README

# Log Helper

A log helper to shutdown log information based on the process.env configuration  

[![Build Status](https://travis-ci.org/PengWang0316/Log.svg?branch=master)](https://travis-ci.org/PengWang0316/Log)
[![Coverage Status](https://coveralls.io/repos/github/PengWang0316/Log/badge.svg?branch=master)](https://coveralls.io/github/PengWang0316/Log?branch=master)

# Installing

```
npm install --save @kevinwang0316/log
```

# Configuration

Add a log_level variable to your .env file.
Or if you are using Fass solution such as AWS Lambda, set up the log_level to your environment.

Log all level of information (debug, info, warn, error)
log_level=DEBUG

Log info and above levels of information (info, warn, error)
log_level=INFO

Log warn and above levels of information (warn, error)
log_level=WARN

Log just error level of information (error)
log_level=ERROR

# Usage

```javascript
import log from '@kevinwang0316/log';
// For NodeJS
// const log = require(''@kevinwang0316/log'');

log.debug('Your debug information');
log.info('Your info information');
log.warn('Your warn information');
log.error('Your error information');
```

# License

Log is licensed under MIT License - see the [License file](https://github.com/PengWang0316/Log/blob/master/LICENSE).

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