Comparing version 0.8.2 to 0.9.0
@@ -32,2 +32,5 @@ /** | ||
client = net.connect(self.options, cb); | ||
client.setTimeout(self.options.timeout || 10000, function () { | ||
client.emit('error', new Error('Timeout (' + self.options.timeout + ' sec)')); | ||
}); | ||
client.on('error', function (err) { | ||
@@ -34,0 +37,0 @@ client.destroy(); |
@@ -133,4 +133,2 @@ /** | ||
gelf.message = function (message, lvl, extra, cb) { | ||
if (_.isNil(message)) { return; } | ||
// it is possible to skip the extra variable | ||
@@ -144,2 +142,5 @@ if (_.isFunction(extra) && !cb) { | ||
// empty call, usually triggered by a thoughtless programmer | ||
if (_.isNil(message)) { return cb(null, 0); } | ||
// cleaning up a bogus call | ||
@@ -146,0 +147,0 @@ if (!_.isUndefined(extra) && !_.isObjectLike(extra)) { |
{ | ||
"name": "gelf-pro", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"main": "./lib/gelf-pro.js", | ||
@@ -20,3 +20,3 @@ "author": "Kanstantsin Kamkou <kkamkou@gmail.com>", | ||
"dependencies": { | ||
"lodash": "~4.15", | ||
"lodash": "~4.16", | ||
"async": "~2.0" | ||
@@ -26,3 +26,3 @@ }, | ||
"istanbul": "~0.4.3", | ||
"should": "~10.0", | ||
"should": "~11.1", | ||
"mocha": "~3.0.0-1", | ||
@@ -29,0 +29,0 @@ "mocha-lcov-reporter": "~1.2.0", |
@@ -13,3 +13,3 @@ node-gelf pro | ||
"dependencies": { | ||
"gelf-pro": "~0.8" // see the "releases" section | ||
"gelf-pro": "~0.9" // see the "releases" section | ||
} | ||
@@ -39,2 +39,3 @@ ``` | ||
family: 4, // tcp only; optional; version of IP stack; default: 4 | ||
timeout: 1000, // tcp only; optional; default: 10000 (10 sec) | ||
host: '127.0.0.1', // optional; default: 127.0.0.1 | ||
@@ -41,0 +42,0 @@ port: 12201 // optional; default: 12201 |
@@ -140,4 +140,3 @@ 'use strict'; | ||
sinon.spy(gelf, 'send'); | ||
gelf.message(); | ||
process.nextTick(function () { | ||
gelf.message(null, 2, function () { | ||
gelf.send.calledOnce.should.be.false(); | ||
@@ -305,3 +304,3 @@ done(); | ||
var adapter = getAdapter('tcp'); | ||
adapter.setOptions({host: 'unknown', port: 5555}); | ||
adapter.setOptions({host: 'unknown', port: 5555, timeout: 1000}); | ||
adapter.send('hello', function (err, result) { | ||
@@ -308,0 +307,0 @@ err.should.be.an.instanceof(Error); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28843
624
129
+ Addedlodash@4.16.6(transitive)
- Removedlodash@4.15.0(transitive)
Updatedlodash@~4.16