winston-syslog
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -17,2 +17,7 @@ /* | ||
// Ensure we have the correct winston here. | ||
if (Number(winston.version.split('.')[0]) < 3) { | ||
throw new Error('Winston-syslog requires winston >= 3.0.0'); | ||
} | ||
const levels = Object.keys({ | ||
@@ -146,2 +151,3 @@ debug: 0, | ||
this.queue.push(syslogMsg); | ||
this.emit('error', logErr); | ||
} | ||
@@ -169,8 +175,6 @@ this.emit('logged', info); | ||
this.socket.once('congestion', onCongestion); | ||
this.socket.once('error', onError); | ||
this.inFlight++; | ||
this.socket.send(buffer, () => { | ||
this.socket.send(buffer, (e) => { | ||
this.socket.removeListener('congestion', onCongestion); | ||
this.socket.removeListener('error', onError); | ||
onError(); | ||
onError(e); | ||
}); | ||
@@ -239,3 +243,3 @@ } | ||
if (this.socket) { | ||
return (!this.socket.readyState) || (this.socket.readyState === 'open') | ||
return ((!this.socket.readyState) || (this.socket.readyState === 'open')) || this.socket.connected | ||
? callback(null) | ||
@@ -242,0 +246,0 @@ : callback(true); |
{ | ||
"name": "winston-syslog", | ||
"description": "A syslog transport for winston", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"author": "Charlie Robbins <charlie.robbins@gmail.com>", | ||
@@ -28,12 +28,15 @@ "contributors": [ | ||
"dependencies": { | ||
"cycle": "~1.0.3", | ||
"glossy": "0.x.x" | ||
"cycle": "^1.0.3", | ||
"glossy": "^0.1.7" | ||
}, | ||
"optionalDependencies": { | ||
"unix-dgram": "~0.2.1" | ||
"unix-dgram": "^2.0.2" | ||
}, | ||
"peerDependencies": { | ||
"winston": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint-config-populist": "^4.1.0", | ||
"vows": "~0.8.1", | ||
"winston": "^3.0.0-rc0" | ||
"vows": "^0.8.2", | ||
"winston": "^3.0.0" | ||
}, | ||
@@ -40,0 +43,0 @@ "main": "./lib/winston-syslog", |
@@ -5,2 +5,12 @@ # winston-syslog | ||
[![Version npm](https://img.shields.io/npm/v/winston-syslog.svg?style=flat-square)](https://www.npmjs.com/package/winston-syslog)[![npm | ||
Downloads](https://img.shields.io/npm/dm/winston-syslog.svg?style=flat-square)](https://npmcharts.com/compare/winston-syslog?minimal=true)[![Build | ||
Status](https://img.shields.io/travis/winstonjs/winston-syslog/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston-syslog)[![Dependencies](https://img.shields.io/david/winstonjs/winston-syslog.svg?style=flat-square)](https://david-dm.org/winstonjs/winston-syslog) | ||
[![NPM](https://nodei.co/npm/winston-syslog.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston-syslog/) | ||
## Requirements | ||
* winston >= 3.0.0 | ||
## Installation | ||
@@ -24,3 +34,3 @@ | ||
The [winston][0] codebase has been growing significantly with contributions and other logging transports. This is **awesome**. However, taking a ton of additional dependencies just to do something simple like logging to the Console and a File is overkill. | ||
The [winston][0] codebase has been growing significantly with contributions and other logging transports. This is **awesome**. However, taking a ton of additional dependencies just to do something simple like logging to the Console and a File is overkill. | ||
@@ -27,0 +37,0 @@ ## Usage |
@@ -98,2 +98,7 @@ /* eslint no-sync: "off" */ | ||
const self = this; | ||
transport.once('error', function (err) { | ||
// Ignore error -- server hasn't come up yet, that's fine/expected | ||
assert(err); | ||
assert.equal(err.syscall, 'send'); | ||
}); | ||
let n = 2; | ||
@@ -110,3 +115,2 @@ try { | ||
assert.equal(d.message, 'node[' + process.pid + ']: data' + n); | ||
assert.equal(d.severity, 'debug'); | ||
if (n === 4) { | ||
@@ -122,2 +126,3 @@ self.callback(); | ||
}); | ||
return null; | ||
}, | ||
@@ -127,2 +132,3 @@ 'should print both the enqueed and the new msg': function (err) { | ||
server.close(); | ||
return null; | ||
} | ||
@@ -129,0 +135,0 @@ } |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
27578
11
667
136
4
4
+ Added@colors/colors@1.6.0(transitive)
+ Added@dabh/diagnostics@2.0.3(transitive)
+ Added@types/triple-beam@1.3.5(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedcolor@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedcolorspace@1.1.4(transitive)
+ Addedenabled@2.0.0(transitive)
+ Addedfecha@4.2.3(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfn.name@1.1.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedkuler@2.0.0(transitive)
+ Addedlogform@2.7.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addednan@2.22.0(transitive)
+ Addedone-time@1.0.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstack-trace@0.0.10(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtext-hex@1.0.0(transitive)
+ Addedtriple-beam@1.4.1(transitive)
+ Addedunix-dgram@2.0.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwinston@3.17.0(transitive)
+ Addedwinston-transport@4.9.0(transitive)
- Removedbindings@1.1.1(transitive)
- Removednan@2.3.5(transitive)
- Removedunix-dgram@0.2.3(transitive)
Updatedcycle@^1.0.3
Updatedglossy@^0.1.7