more linting

This commit is contained in:
Gareth Jones 2013-05-30 08:00:04 +10:00
parent cc2e94cf11
commit 40ec9e98e4

View File

@ -1,7 +1,8 @@
var fs = require('fs'), "use strict";
stream, var fs = require('fs')
util = require('util'), , stream
semver = require('semver'); , util = require('util')
, semver = require('semver');
if (semver.satisfies(process.version, '>=0.10.0')) { if (semver.satisfies(process.version, '>=0.10.0')) {
stream = require('stream'); stream = require('stream');
@ -11,9 +12,9 @@ if (semver.satisfies(process.version, '>=0.10.0')) {
var debug; var debug;
if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_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 { } else {
debug = function() { }; debug = function() { };
} }
module.exports = BaseRollingFileStream; module.exports = BaseRollingFileStream;
@ -21,7 +22,7 @@ module.exports = BaseRollingFileStream;
function BaseRollingFileStream(filename, options) { function BaseRollingFileStream(filename, options) {
debug("In BaseRollingFileStream"); debug("In BaseRollingFileStream");
this.filename = filename; 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; this.currentSize = 0;
function currentFileSize(file) { function currentFileSize(file) {
@ -80,10 +81,10 @@ BaseRollingFileStream.prototype.closeTheStream = function(cb) {
}; };
BaseRollingFileStream.prototype.shouldRoll = function() { 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) { BaseRollingFileStream.prototype.roll = function(filename, callback) {
callback(); // default behaviour is not to do anything callback(); // default behaviour is not to do anything
}; };