Log compression.

This commit is contained in:
Luis Malheiro
2014-08-27 16:08:17 +02:00
parent 6fa998408a
commit 036293db41
3 changed files with 42 additions and 8 deletions

View File

@@ -16,7 +16,11 @@ module.exports = BaseRollingFileStream;
function BaseRollingFileStream(filename, options) {
debug("In BaseRollingFileStream");
this.filename = filename;
this.options = options || { encoding: 'utf8', mode: parseInt('0644', 8), flags: 'a' };
this.options = options || {};
this.options.encoding = this.options.encoding || 'utf8';
this.options.mode = this.options.mode || parseInt('0644', 8);
this.options.flags = this.options.flags || 'a';
this.currentSize = 0;
function currentFileSize(file) {