winston-daily-rotate-file
Advanced tools
Comparing version 2.0.0-rc.3 to 2.0.0-rc.4
@@ -76,18 +76,2 @@ 'use strict'; | ||
this.logStream.on('close', function () { | ||
self.emit('close'); | ||
}); | ||
this.logStream.on('finish', function () { | ||
self.emit('finish'); | ||
}); | ||
this.logStream.on('error', function (err) { | ||
self.emit('error', err); | ||
}); | ||
this.logStream.on('open', function (fd) { | ||
self.emit('open', fd); | ||
}); | ||
this.logStream.on('rotate', function (oldFile, newFile) { | ||
@@ -141,5 +125,10 @@ self.emit('rotate', oldFile, newFile); | ||
DailyRotateFile.prototype.close = function () { | ||
DailyRotateFile.prototype.end = function (chunk, encoding, callback) { | ||
var self = this; | ||
if (this.logStream) { | ||
this.logStream.end(); | ||
this.logStream.end(chunk, encoding, function () { | ||
self.emit('finish'); | ||
callback = callback || noop; | ||
callback(); | ||
}); | ||
} | ||
@@ -146,0 +135,0 @@ }; |
{ | ||
"name": "winston-daily-rotate-file", | ||
"version": "2.0.0-rc.3", | ||
"version": "2.0.0-rc.4", | ||
"description": "A transport for winston which logs to a rotating file each day.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -122,3 +122,3 @@ /* eslint-disable max-nested-callbacks,no-unused-expressions,handle-callback-err */ | ||
this.transport.close(); | ||
this.transport.end(); | ||
}); | ||
@@ -154,3 +154,3 @@ | ||
sendLogItem(this.transport, 'info', randomString(1056)); | ||
self.transport.close(); | ||
self.transport.end(); | ||
}); | ||
@@ -180,4 +180,2 @@ }); | ||
this.transport.close(); | ||
var self = this; | ||
@@ -191,2 +189,4 @@ this.transport.on('finish', function () { | ||
}); | ||
this.transport.end(); | ||
}); | ||
@@ -193,0 +193,0 @@ }); |
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
22883
11
461