# pea-logger

> a plugin for logger

Latest version **0.0.23** (published 2018-09-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install pea-logger
pnpm add pea-logger
yarn add pea-logger
bun add pea-logger
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.23 |
| Published | 2018-09-12 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | tim |
| Maintainers | timliu |
| Keywords | logger |

## Links

- npm: https://www.npmjs.com/package/pea-logger
- npm.io page: https://npm.io/package/pea-logger

## Dependencies (2)

- [log4js](https://npm.io/package/log4js.md) ^2.7.0
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^8.2.3

## 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

- 0.0.23 (latest) — 2018-09-12
- 0.0.22 — 2018-06-14
- 0.0.21 — 2018-06-03
- 0.0.11 — 2018-05-30

## README

[![npm package](https://badge.fury.io/js/pea-logger.svg)](https://www.npmjs.com/package/pea-logger)


# Features
Pea-logger is a further package and extension based on log4js. It supports log for different types of error classification and integration. You can quickly and clearly check the log of current day and many days ago. You can also choose to view only error type of log. 

## Isn't it good? Let's start using it

# Quick Start
## Install
```shell
$ npm i pea-logger
```

## Basic Usage

```javascript

const peaLogger = require('pea-logger');

//Configuration
peaLogger.connect({ name: 'test', level: 'debug' });
// debug
logger.debug(JSON.stringify(process.env));
// info
logger.info('test success');
// error
logger.error('it is wrong');


```

If you want to do some configration of logger, such as error log path, logger name, ...etc 

For example:

```javascript

const config = {
    // this is the name of logger file, default is logger(it contains error logger file name and whole logger file name)
    name: 'test',
    // Configure the log output level
    level: 'debug'
}
peaLogger.connect(config);

```


# Join in!

I'm happy to receive bug reports, fixes, documentation enhancements, and any other improvements.

And since I'm not a native English speaker, if you find any grammar mistakes in the documentation, please also let me know. :)

# Contributors
<table><tr><td width="20%"><a href="https://github.com/TimLiu1"><img src="https://avatars2.githubusercontent.com/u/16770736?s=460&v=4" /></a><p align="center">TimLiu1</p></td><td width="20%"><a href="https://github.com/InCodingNowLiu"><img src="https://avatars0.githubusercontent.com/u/31758568?s=460&v=4" /></a><p align="center">InCodingNowLiu</p></td></tr></table>

# License

MIT

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