Socket
Socket
Sign inDemoInstall

bunyan-winston-adapter

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

9

index.js

@@ -44,6 +44,13 @@ 'use strict';

createAdapter: function(winston) {
createAdapter: function(winston, mapping) {
var obj = Object.create(this, {
_winston: {value: winston}
});
if (typeof mapping === 'object') {
for (var key in mapping) {
obj[key] = _log(mapping[key]);
}
}
return obj;

@@ -50,0 +57,0 @@ }

2

package.json
{
"name": "bunyan-winston-adapter",
"version": "0.1.0",
"version": "0.2.0",
"description": "Allows to use winston logger in restify server without really using bunyan.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,2 +22,14 @@ bunyan-winston-adapter

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?

@@ -24,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc