replaced 'sys' with 'util' (issue #42)
This commit is contained in:
parent
342286e062
commit
050fae5230
@ -47,7 +47,7 @@
|
|||||||
var events = require('events')
|
var events = require('events')
|
||||||
, fs = require('fs')
|
, fs = require('fs')
|
||||||
, path = require('path')
|
, path = require('path')
|
||||||
, sys = require('sys')
|
, util = require('util')
|
||||||
, layouts = require('./layouts')
|
, layouts = require('./layouts')
|
||||||
, levels = require('./levels')
|
, levels = require('./levels')
|
||||||
, consoleAppender = require('./appenders/console').appender
|
, consoleAppender = require('./appenders/console').appender
|
||||||
@ -143,7 +143,7 @@ function configureAppenders(appenderList) {
|
|||||||
if (appender) {
|
if (appender) {
|
||||||
addAppender(appender, appenderConfig.category);
|
addAppender(appender, appenderConfig.category);
|
||||||
} else {
|
} else {
|
||||||
throw new Error("log4js configuration problem for "+sys.inspect(appenderConfig));
|
throw new Error("log4js configuration problem for "+util.inspect(appenderConfig));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -198,7 +198,7 @@ function Logger (name, level) {
|
|||||||
this.__proto__.level = levels.TRACE;
|
this.__proto__.level = levels.TRACE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sys.inherits(Logger, events.EventEmitter);
|
util.inherits(Logger, events.EventEmitter);
|
||||||
|
|
||||||
Logger.prototype.setLevel = function(level) {
|
Logger.prototype.setLevel = function(level) {
|
||||||
this.level = levels.toLevel(level, levels.TRACE);
|
this.level = levels.toLevel(level, levels.TRACE);
|
||||||
@ -280,7 +280,7 @@ function configureOnceOff(config) {
|
|||||||
configureAppenders(config.appenders);
|
configureAppenders(config.appenders);
|
||||||
configureLevels(config.levels);
|
configureLevels(config.levels);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error("Problem reading log4js config " + sys.inspect(config) + ". Error was \"" + e.message + "\" ("+e.stack+")");
|
throw new Error("Problem reading log4js config " + util.inspect(config) + ". Error was \"" + e.message + "\" ("+e.stack+")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user