Comparing version 3.0.0-meta.1 to 3.0.0
{ | ||
"name": "log2amqp", | ||
"description": "Log json data to amqp from express routes.", | ||
"version": "3.0.0-meta.1", | ||
"version": "3.0.0", | ||
"author": "Tim Allen <tim@noblesamurai.com>", | ||
@@ -6,0 +6,0 @@ "license": "BSD", |
@@ -18,4 +18,4 @@ # log2amqp [](http://travis-ci.org/noblesamurai/node-log2amqp) [](http://badges.enytc.com/for/npm/log2amqp) | ||
}; | ||
const Logger = require('log2amqp')(config); | ||
let logger = Logger(); | ||
const AMQPLogger = require('log2amqp'); | ||
const logger = new AMQPLogger(config); | ||
payload = { this: 'thing'}; | ||
@@ -25,3 +25,15 @@ logger.log('kind', payload); | ||
logger.flush({ meta: {/* ... */} }).then(() => { | ||
// [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey | ||
// [{ kind: payload }, { kind2: 'chris' }] is flushed to amqp routingKey (schemaVersion === 2) | ||
// OR | ||
/* | ||
[ | ||
{ type: 'kind', | ||
data: 'payload' | ||
}, | ||
{ | ||
type: 'kind2', | ||
data: 'chris' | ||
} | ||
] is flushed to amqp routingKey (schemaVersion === 3) | ||
*/ | ||
}); | ||
@@ -28,0 +40,0 @@ ``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14844
0
131
0