winston-daily-rotate-file
Advanced tools
Comparing version 4.4.3 to 4.5.0
@@ -108,3 +108,12 @@ 'use strict'; | ||
if (fs.existsSync(gzName)) { | ||
fs.unlinkSync(gzName); | ||
try { | ||
fs.unlinkSync(gzName); | ||
} | ||
catch (_err) { | ||
// file is there but we got an error when trying to delete, | ||
// so permissions problem or concurrency issue and another | ||
// process already deleted it we could detect the concurrency | ||
// issue by checking err.type === ENOENT or EACCESS for | ||
// permissions ... but then? | ||
} | ||
self.emit('logRemoved', gzName); | ||
@@ -301,3 +310,5 @@ return; | ||
var time = new Date(log.timestamp); | ||
if ((options.from && time < options.from) || (options.until && time > options.until)) { | ||
if ((options.from && time < options.from) || | ||
(options.until && time > options.until) || | ||
(options.level && options.level !== log.level)) { | ||
return; | ||
@@ -304,0 +315,0 @@ } |
{ | ||
"name": "winston-daily-rotate-file", | ||
"version": "4.4.3", | ||
"version": "4.5.0", | ||
"description": "A transport for winston which logs to a rotating file each day.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
34133
659