# logger-dispatcher

> This is an abstraction for winston logger, with this package we can just inform the transporter and it will provide a winston instance configured

Latest version **1.0.5** (published 2020-05-04) · MIT license · 0 weekly downloads

## Install

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

## 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.5 |
| Published | 2020-05-04 |
| First published | 2019-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Albo Vieira |
| Maintainers | albovieira |
| Keywords | log, logger, winston, abstraction, elastic, logger-redis, logger-firerose, console, logger-console |

## Links

- npm: https://www.npmjs.com/package/logger-dispatcher
- Repository: https://github.com/albovieira/logger-dispatcher
- Homepage: https://github.com/albovieira/logger-dispatcher#readme
- Issues: https://github.com/albovieira/logger-dispatcher/issues
- npm.io page: https://npm.io/package/logger-dispatcher

## Dependencies (7)

- [redis](https://npm.io/package/redis.md) ^2.8.0
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [winston-redis](https://npm.io/package/winston-redis.md) ^3.0.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [winston-firehose](https://npm.io/package/winston-firehose.md) ^2.0.1
- [winston-elasticsearch](https://npm.io/package/winston-elasticsearch.md) ^0.8.8
- [winston-kinesis-transport](https://npm.io/package/winston-kinesis-transport.md) 0.0.2

## 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.5 (latest) — 2020-05-04
- 1.0.4 — 2020-05-04
- 1.0.3 — 2020-03-18
- 1.0.2 — 2020-02-21
- 1.0.1 — 2019-05-13
- 1.0.0 — 2019-05-13

## README

# Logger Dispatcher [![npm version](https://badge.fury.io/js/logger-dispatcher.svg)](//npmjs.com/package/logger-dispatcher)

> An abstraction for winston logger, with this package we can just inform the transporter and it will provide a winston instance configured

**It suports**

- Console
- Redis
- Firehose

[![Build Status](http://img.shields.io/travis/badges/badgerbadgerbadger.svg?style=flat-square)](https://travis-ci.org/badges/badgerbadgerbadger) [![Dependency Status](http://img.shields.io/gemnasium/badges/badgerbadgerbadger.svg?style=flat-square)](https://gemnasium.com/badges/badgerbadgerbadger) [![Coverage Status](http://img.shields.io/coveralls/badges/badgerbadgerbadger.svg?style=flat-square)](https://coveralls.io/r/badges/badgerbadgerbadger) [![Code Climate](http://img.shields.io/codeclimate/github/badges/badgerbadgerbadger.svg?style=flat-square)](https://codeclimate.com/github/badges/badgerbadgerbadger)

## Sumary

- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [License](#license)

---

## Installation

```shell
$ npm install logger-dispatcher
```

## Usage

#### Local

```javascript
/** logger is an instance of winston with local console as a transporter **/
const logger = factory.create('console', {
  level: 'verbose'
});
```

#### Firehose

```javascript
/** logger is an instance of winston with firehose as a transporter **/
const logger = factory.create('console', {
  level: 'debug',
  name: 'container-name',
  region: 'us-east-1',
  accessKeyId: 'AWS_KEY',
  secretAccessKey: 'AWS_SECRET'
});
```

#### Redis

```javascript
/** logger is an instance of winston with redis as a transporter **/
const logger = factory.create('redis', {
  level: 'verbose',
  container: 'container-name',
  environment: 'homologation',
  host: 'redis-host.com.br',
  port: '6379'
});
```

## Features

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**

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