replaced my debug lib with standard one

This commit is contained in:
Gareth Jones
2013-08-25 11:55:26 +10:00
parent 5a2771cfed
commit 50074842ad
9 changed files with 31 additions and 112 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
"use strict";
var BaseRollingFileStream = require('./BaseRollingFileStream')
, debug = require('../debug')('DateRollingFileStream')
, debug = require('debug')('log4js:DateRollingFileStream')
, format = require('../date_format')
, async = require('async')
, fs = require('fs')
@@ -9,7 +9,7 @@ var BaseRollingFileStream = require('./BaseRollingFileStream')
module.exports = DateRollingFileStream;
function DateRollingFileStream(filename, pattern, options, now) {
debug("Now is " + now);
debug("Now is ", now);
if (pattern && typeof(pattern) === 'object') {
now = options;
options = pattern;
@@ -31,7 +31,7 @@ function DateRollingFileStream(filename, pattern, options, now) {
options = null;
}
}
debug("this.now is " + this.now + ", now is " + now);
debug("this.now is ", this.now, ", now is ", now);
DateRollingFileStream.super_.call(this, filename, options);
}
@@ -41,8 +41,8 @@ DateRollingFileStream.prototype.shouldRoll = function() {
var lastTime = this.lastTimeWeWroteSomething,
thisTime = format.asString(this.pattern, new Date(this.now()));
debug("DateRollingFileStream.shouldRoll with now = " +
this.now() + ", thisTime = " + thisTime + ", lastTime = " + lastTime);
debug("DateRollingFileStream.shouldRoll with now = ",
this.now(), ", thisTime = ", thisTime, ", lastTime = ", lastTime);
this.lastTimeWeWroteSomething = thisTime;
this.previousTime = lastTime;
@@ -81,7 +81,7 @@ DateRollingFileStream.prototype.roll = function(filename, callback) {
}
function renameTheCurrentFile(cb) {
debug("Renaming the " + filename + " -> " + newFilename);
debug("Renaming the ", filename, " -> ", newFilename);
fs.rename(filename, newFilename, cb);
}