Socket
Socket
Sign inDemoInstall

gelf-pro

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gelf-pro - npm Package Compare versions

Comparing version 0.8.2 to 0.9.0

3

lib/adapter/tcp.js

@@ -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();

5

lib/gelf-pro.js

@@ -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);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc