rotating-file-stream
Advanced tools
Comparing version 1.0.3 to 1.0.4
15
index.js
@@ -153,5 +153,8 @@ "use strict"; | ||
if((! self.options.size) || stats.size < self.options.size) | ||
self.open(); | ||
else | ||
self.rotate(); | ||
return self.open(); | ||
if(self.options.interval) | ||
self._interval(self.now()); | ||
self.rotate(); | ||
}); | ||
@@ -186,3 +189,3 @@ }; | ||
var now = new Date().getTime(); | ||
var now = this.now(); | ||
var unit = this.options.interval.unit; | ||
@@ -246,2 +249,6 @@ | ||
RotatingFileStream.prototype.now = function(retry) { | ||
return new Date().getTime(); | ||
}; | ||
RotatingFileStream.prototype.open = function(retry) { | ||
@@ -248,0 +255,0 @@ var fd; |
{ | ||
"name": "rotating-file-stream", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -257,2 +257,3 @@ # rotating-file-stream | ||
compatibility. The package it tested under following versions: | ||
* 5.0 | ||
* 4.2 | ||
@@ -272,6 +273,9 @@ * 4.1 | ||
Do not hesitate to report any bug or inconsistency @[github](https://github.com/iccicci/rotating-file-stream/issues). | ||
Do not hesitate to report any bug or inconsistency [@github](https://github.com/iccicci/rotating-file-stream/issues). | ||
### ChangeLog | ||
* 2015-11-09 - v1.0.4 | ||
* Tested on node v5.0 | ||
* Fixed bug on [initial rotation with interval](https://github.com/iccicci/rotating-file-stream/issues/2) | ||
* 2015-10-25 - v1.0.3 | ||
@@ -278,0 +282,0 @@ * Tested on node v4.2 |
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
25077
489
304