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'),
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
};