parent
783b1c4e39
commit
d77f824723
1 changed files with 6 additions and 1 deletions
|
@ -1051,7 +1051,12 @@ function RotatingFileStream(options) {
|
||||||
this.stream = fs.createWriteStream(this.path,
|
this.stream = fs.createWriteStream(this.path,
|
||||||
{flags: 'a', encoding: 'utf8'});
|
{flags: 'a', encoding: 'utf8'});
|
||||||
this.count = (options.count == null ? 10 : options.count);
|
this.count = (options.count == null ? 10 : options.count);
|
||||||
assert.ok(typeof (this.count) === 'number' && this.count >= 0);
|
assert.equal(typeof (self.count), 'number',
|
||||||
|
format('rotating-file stream "count" is not a number: %j (%s) in %j',
|
||||||
|
self.count, typeof(self.count), self));
|
||||||
|
assert.ok(self.count >= 0,
|
||||||
|
format('rotating-file stream "count" is not >= 0: %j in %j',
|
||||||
|
self.count, self));
|
||||||
|
|
||||||
// Parse `options.period`.
|
// Parse `options.period`.
|
||||||
if (options.period) {
|
if (options.period) {
|
||||||
|
|
Loading…
Reference in a new issue