# shiny-es-logger

> Creates bunyan logger bound to elasticsearch output.

Latest version **0.3.1** (published 2015-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install shiny-es-logger
pnpm add shiny-es-logger
yarn add shiny-es-logger
bun add shiny-es-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.3.1 |
| Published | 2015-11-30 |
| First published | 2015-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Reese Wilson |
| Maintainers | shinymayhem |
| Keywords | elasticsearch, bunyan, logging, logger |

## Links

- npm: https://www.npmjs.com/package/shiny-es-logger
- Repository: https://github.com/shinymayhem/node-es-logger
- Issues: https://github.com/shinymayhem/node-es-logger/issues
- npm.io page: https://npm.io/package/shiny-es-logger

## Dependencies (2)

- [bunyan](https://npm.io/package/bunyan.md) ^1.3.4
- [bunyan-elasticsearch-updated](https://npm.io/package/bunyan-elasticsearch-updated.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
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K 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

## Recent versions

- 0.3.1 (latest) — 2015-11-30
- 0.3.0 — 2015-11-30

## README

# node-es-logger v0.3.1

Forked from https://github.com/kt3k/node-es-logger to add custom `log` function and allow dynamic type override

This module creates a [bunyan](https://github.com/trentm/node-bunyan) logger instance with an output stream bound to [elasticsearch](https://github.com/elasticsearch/elasticsearch) instance with [logstash](https://github.com/elasticsearch/logstash) compatible JSON format.


## Example

```js
var logger = require('es-logger').create({

    name: 'myapp',
    host: 'localhost:9200'

});

logger.log(type, {object: value});
```

This prints a JSON and also send it to elasticsearch instance at `localhost:9200`.


### Use with [bonsai.io](https://bonsai.io/).

```js
var logger = require('es-logger').create({

    name: 'myapp',
    host: 'username:password@myapp-name-123456789.us-west-2.bonsai.io'

});

logger.info({value: 123}, 'message');
```

This prints a JSON and also send it to *bonsai*'s elasticsearch instance at `myapp-name-123456789.us-west-2.bonsai.io`.


see [bunyan's README](https://github.com/trentm/node-bunyan#log-method-api) for what interfaces the `logger` has.

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