Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "pino-roll", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A Pino transport that automatically rolls your log files", | ||
@@ -5,0 +5,0 @@ "main": "pino-roll.js", |
@@ -78,3 +78,3 @@ 'use strict' | ||
const fileName = buildFileName(file, number, extension) | ||
let fileName = buildFileName(file, number, extension) | ||
const createdFileNames = [fileName] | ||
@@ -97,3 +97,3 @@ let currentSize = await getFileSize(fileName) | ||
currentSize += writtenSize | ||
if (currentSize >= maxSize) { | ||
if (fileName === destination.file && currentSize >= maxSize) { | ||
currentSize = 0 | ||
@@ -107,3 +107,3 @@ // delay to let the destination finish its write | ||
function roll () { | ||
const fileName = buildFileName(file, ++number, extension) | ||
fileName = buildFileName(file, ++number, extension) | ||
destination.reopen(fileName) | ||
@@ -110,0 +110,0 @@ if (limit) { |
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
26442