bunyan-winston-adapter

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
bunyan-winston-adapter
1000.2.09 years ago9 years agoMinified + gzip package size for bunyan-winston-adapter in KB

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), }); ```

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