Tidy up all console.log util.log from core nodes.

Try to make log,warn,error more consistent behaviour.

Especially make sure any existing catches produce errors
This commit is contained in:
dceejay
2015-02-25 19:10:44 +00:00
parent b6245bdef7
commit 71ff828947
13 changed files with 54 additions and 65 deletions

View File

@@ -16,7 +16,6 @@
module.exports = function(RED) {
"use strict";
var util = require("util");
var redis = require("redis");
var hashFieldRE = /^([^=]+)=(.*)$/;
@@ -29,10 +28,10 @@ module.exports = function(RED) {
if (!connections[id]) {
connections[id] = redis.createClient(port,host);
connections[id].on("error",function(err) {
util.log("[redis] "+err);
RED.log.error(err);
});
connections[id].on("connect",function() {
util.log("[redis] connected to "+host+":"+port);
if (RED.settings.verbose) { RED.log.info("connected to "+host+":"+port); }
});
connections[id]._id = id;
connections[id]._nodeCount = 0;