snap node - remove extraneous console logging

This commit is contained in:
Dave Conway-Jones 2016-09-01 11:17:18 +01:00
parent 71c0a0c7cf
commit f70cd1d640
2 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
{ {
"name" : "node-red-node-snmp", "name" : "node-red-node-snmp",
"version" : "0.0.7", "version" : "0.0.8",
"description" : "A Node-RED node that looks for SNMP oids.", "description" : "A Node-RED node that looks for SNMP oids.",
"dependencies" : { "dependencies" : {
"net-snmp" : "1.1.13" "net-snmp" : "^1.1.19"
}, },
"repository" : { "repository" : {
"type":"git", "type":"git",

View File

@ -76,7 +76,7 @@ module.exports = function(RED) {
function responseCb(error, table) { function responseCb(error, table) {
if (error) { if (error) {
console.error(error.toString()); le.error(error.toString());
} else { } else {
var indexes = []; var indexes = [];
for (var index in table) { for (var index in table) {
@ -93,10 +93,10 @@ module.exports = function(RED) {
} }
} }
columns.sort(sortInt); columns.sort(sortInt);
console.log("row index = " + indexes[i]); // console.log("row index = " + indexes[i]);
for (var j = 0; j < columns.length; j++) { // for (var j = 0; j < columns.length; j++) {
console.log(" column " + columns[j] + " = " + table[indexes[i]][columns[j]]); // console.log(" column " + columns[j] + " = " + table[indexes[i]][columns[j]]);
} // }
} }
msg.payload = table; msg.payload = table;
node.send(msg); node.send(msg);
@ -146,7 +146,7 @@ module.exports = function(RED) {
node.error(snmp.varbindError(varbinds[i])); node.error(snmp.varbindError(varbinds[i]));
} }
else { else {
console.log(varbinds[i].oid + "|" + varbinds[i].value); //console.log(varbinds[i].oid + "|" + varbinds[i].value);
response.add({oid: varbinds[i].oid, value: varbinds[i].value}); response.add({oid: varbinds[i].oid, value: varbinds[i].value});
} }
} }
@ -195,7 +195,7 @@ module.exports = function(RED) {
node.error(snmp.varbindError(varbinds[i])); node.error(snmp.varbindError(varbinds[i]));
} }
else { else {
console.log(varbinds[i].oid + "|" + varbinds[i].value); //console.log(varbinds[i].oid + "|" + varbinds[i].value);
response.add({oid: varbinds[i].oid, value: varbinds[i].value}); response.add({oid: varbinds[i].oid, value: varbinds[i].value});
} }
} }