Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "pino-roll", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A Pino transport that automatically rolls your log files", | ||
@@ -5,0 +5,0 @@ "main": "pino-roll.js", |
@@ -98,4 +98,5 @@ 'use strict' | ||
currentSize = 0 | ||
fileName = buildFileName(file, ++number, extension) | ||
// delay to let the destination finish its write | ||
setTimeout(roll, 0) | ||
destination.once('drain', roll) | ||
} | ||
@@ -106,3 +107,2 @@ }) | ||
function roll () { | ||
fileName = buildFileName(file, ++number, extension) | ||
destination.reopen(fileName) | ||
@@ -118,2 +118,3 @@ if (limit) { | ||
rollTimeout = setTimeout(() => { | ||
fileName = buildFileName(file, ++number, extension) | ||
roll() | ||
@@ -120,0 +121,0 @@ frequencySpec.next = getNext(frequency) |
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
26516
580