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

@@ -61,7 +61,6 @@
access_token: {type: "password"},
access_token_secret: {type:"password"}
},
label: function() {
return this.screen_name;
},
@@ -177,11 +176,10 @@
$("#node-input-tags-row").show();
$("#node-input-tags-label").html("for");
$("#node-input-tags").attr("placeholder","comma-separated words, @ids, #hashtags");
}
}
});
$("#node-input-user").change();
}
});
</script>

View File

@@ -218,7 +218,7 @@ module.exports = function(RED) {
}
});
stream.on('limit', function(tweet) {
node.log("tweet rate limit hit");
node.warn("tweet rate limit hit");
});
stream.on('error', function(tweet,rc) {
if (rc == 420) {
@@ -367,8 +367,8 @@ module.exports = function(RED) {
credentials.oauth_verifier,
function(error, oauth_access_token, oauth_access_token_secret, results){
if (error){
console.log(error);
res.send("yeah something broke.");
RED.log.error(error);
res.send("something in twitter oauth broke.");
} else {
credentials = {};
credentials.access_token = oauth_access_token;