bunyan-loggly
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -27,2 +27,6 @@ | ||
if (typeof rec !== 'object' && !Array.isArray(rec)) { | ||
throw new Error('bunyan-loggly requires a raw stream. Please define the type as raw when setting up the bunyan stream.'); | ||
} | ||
if (typeof rec === 'object') { | ||
@@ -29,0 +33,0 @@ |
{ | ||
"name": "bunyan-loggly", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A bunyan stream to transport logs to loggly", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,2 +17,15 @@ var should = require('should'), | ||
it('should throw if not used as a raw stream', function () { | ||
var logger = new Bunyan2Loggly({ | ||
token: config.token, | ||
subdomain: config.subdomain | ||
}); | ||
(function () { | ||
logger.write(JSON.stringify({})) | ||
}).should.throw(); | ||
}); | ||
describe('when using the buffer', function () { | ||
@@ -19,0 +32,0 @@ |
7488
127