From 40ec9e98e4c17efaf83f0638c01a3de9a89d6447 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Thu, 30 May 2013 08:00:04 +1000 Subject: [PATCH] more linting --- lib/streams/BaseRollingFileStream.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/streams/BaseRollingFileStream.js b/lib/streams/BaseRollingFileStream.js index 3bd8b2b..36cf4fc 100644 --- a/lib/streams/BaseRollingFileStream.js +++ b/lib/streams/BaseRollingFileStream.js @@ -1,7 +1,8 @@ -var fs = require('fs'), -stream, -util = require('util'), -semver = require('semver'); +"use strict"; +var fs = require('fs') +, stream +, util = require('util') +, semver = require('semver'); if (semver.satisfies(process.version, '>=0.10.0')) { stream = require('stream'); @@ -11,9 +12,9 @@ if (semver.satisfies(process.version, '>=0.10.0')) { var debug; if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) { - debug = function(message) { console.error('LOG4JS: (BaseRollingFileStream) %s', message); }; + debug = function(message) { console.error('LOG4JS: (BaseRollingFileStream) %s', message); }; } else { - debug = function() { }; + debug = function() { }; } module.exports = BaseRollingFileStream; @@ -21,9 +22,9 @@ module.exports = BaseRollingFileStream; function BaseRollingFileStream(filename, options) { debug("In BaseRollingFileStream"); this.filename = filename; - this.options = options || { encoding: 'utf8', mode: 0644, flags: 'a' }; + this.options = options || { encoding: 'utf8', mode: parseInt('0644', 8), flags: 'a' }; this.currentSize = 0; - + function currentFileSize(file) { var fileSize = 0; try { @@ -80,10 +81,10 @@ BaseRollingFileStream.prototype.closeTheStream = function(cb) { }; BaseRollingFileStream.prototype.shouldRoll = function() { - return false; // default behaviour is never to roll + return false; // default behaviour is never to roll }; BaseRollingFileStream.prototype.roll = function(filename, callback) { - callback(); // default behaviour is not to do anything + callback(); // default behaviour is not to do anything };