# bunyan-mongodb

> MongoDB Stream to Bunyan Logger

Latest version **1.2.3** (published 2018-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install bunyan-mongodb
pnpm add bunyan-mongodb
yarn add bunyan-mongodb
bun add bunyan-mongodb
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2018-03-27 |
| First published | 2017-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Evgeni Zharkov |
| Maintainers | zharkov |

## Links

- npm: https://www.npmjs.com/package/bunyan-mongodb
- Repository: https://github.com/zharkov-eu/bunyan-mongodb
- Homepage: https://github.com/zharkov-eu/bunyan-mongodb#readme
- Issues: https://github.com/zharkov-eu/bunyan-mongodb/issues
- npm.io page: https://npm.io/package/bunyan-mongodb

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^3.0.5

## Recent versions

- 1.2.3 (latest) — 2018-03-27
- 1.2.2 — 2018-03-22
- 1.2.1 — 2018-03-22
- 1.1.1 — 2018-03-06
- 1.1.0 — 2018-03-05
- 1.0.2 — 2017-09-08
- 1.0.1 — 2017-09-08
- 1.0.0 — 2017-09-07

## README

# bunyan-mongodb
Mongodb stream for bunyan logger / other uses

Usage example:

```javascript
    const bunyan = require("bunyan");
    const bunyanMongo = require("bunyan-mongodb");
    
    const logger = bunyan.createLogger({
      name: "Logger Name",
      streams: [
        { 
            level: bunyan.INFO,
            stream: bunyanMongo({
                host: "localhost",
                database: "example",
                collection: "log",
                username: "user", // Optional
                password: "pwd", // Optional
                authDatabase: "admin", // Optional
                batchSize: 100,
            }) 
        },
      ],
    });
```

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