# bunyan-winston-adapter

> Allows to use winston logger in restify server without really using bunyan.

Latest version **0.2.0** (published 2013-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install bunyan-winston-adapter
pnpm add bunyan-winston-adapter
yarn add bunyan-winston-adapter
bun add bunyan-winston-adapter
```

## Health

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

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2013-08-01 |
| First published | 2013-07-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/bunyan-winston-adapter) |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Rafał Jońca |
| Maintainers | gluwer |
| Keywords | bunyan, winston, restify |

## Links

- npm: https://www.npmjs.com/package/bunyan-winston-adapter
- Repository: https://github.com/gluwer/bunyan-winston-adapter
- Issues: https://github.com/gluwer/bunyan-winston-adapter/issues
- npm.io page: https://npm.io/package/bunyan-winston-adapter

## 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.2.0 (latest) — 2013-08-01
- 0.1.0 — 2013-07-29

## README

bunyan-winston-adapter
======================

Allows to use winston logger in restify server without bunyan. Must be used with already installed winston.

At the moment is is very simple and its main purpose is to log some restify internal logs (that expect bunyan) using
winston logger. It only supports default winston log levels.

Level `trace` is mapped to `debug` and level `fatal` is mapped to `error`.

## How to use with restify

```
var bunyanToWinstonAdapter = require('bunyan-winston-adapter');

// pass to adapter a winston logger instance (may be whole module if default logger is used)
restify.createServer({
  log: bunyanToWinstonAdapter.createAdapter(winston),
});
```

It is also possible to provide your own mapping from bunyan to winston. This will override default mapping. You can provide only the types you want to override:

```
var mapping = {
  trace: 'silly'
};

restify.createServer({
  log: bunyanToWinstonAdapter.createAdapter(winston, mapping),
});
```

## Why not add a logger to bunyan that pushes to winston?

I do not want to have some things passed from one logger to another which will be slower and amount of code in both
cases is similar.

## License

MIT

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