Debug message formatting mangling brackets

This commit is contained in:
Nick O'Leary
2015-03-20 22:09:58 +00:00
parent 1d10eba0cc
commit b61a250d58
5 changed files with 66 additions and 40 deletions

View File

@@ -21,7 +21,7 @@ var typeRegistry = require("./registry");
var credentials = require("./credentials");
var redUtil = require("../util");
var events = require("../events");
var log = require("../log");
var Log = require("../log");
function getID() {
return (1+Math.random()*4294967295).toString(16);
@@ -35,10 +35,15 @@ function createNode(type,config) {
nn = new nt(clone(config));
}
catch (err) {
log.warn(type+" : "+err);
Log.log({
level: Log.ERROR,
id:config.id,
type: type,
msg: err
});
}
} else {
log.warn("unknown type: "+type);
Log.error("Unknown type: "+type);
}
return nn;
}