Skip to content

Commit 69f83cb

Browse files
author
Dave Conway-Jones
committed
fully log node warnings on start
(i.e. don’t need -v for simple errors on start)
1 parent 807873f commit 69f83cb

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

red/runtime/index.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ var stubbedExpressApp = {
3434
get: function() {},
3535
post: function() {},
3636
put: function() {},
37-
delete: function(){}
37+
delete: function() {}
3838
}
3939
var adminApi = {
4040
library: {
41-
register: function(){}
41+
register: function() {}
4242
},
4343
auth: {
44-
needsPermission: function(){}
44+
needsPermission: function() {}
4545
},
4646
comms: {
47-
publish: function(){}
47+
publish: function() {}
4848
},
4949
adminApp: stubbedExpressApp,
5050
nodeApp: stubbedExpressApp,
@@ -105,16 +105,11 @@ function start() {
105105
var nodeErrors = redNodes.getNodeList(function(n) { return n.err!=null;});
106106
var nodeMissing = redNodes.getNodeList(function(n) { return n.module && n.enabled && !n.loaded && !n.err;});
107107
if (nodeErrors.length > 0) {
108-
log.warn("------------------------------------------");
109-
if (settings.verbose) {
110-
for (i=0;i<nodeErrors.length;i+=1) {
111-
log.warn("["+nodeErrors[i].name+"] "+nodeErrors[i].err);
112-
}
113-
} else {
114-
log.warn(log._("server.errors",{count:nodeErrors.length}));
115-
log.warn(log._("server.errors-help"));
108+
log.warn("------------------------------------------------------");
109+
for (i=0;i<nodeErrors.length;i+=1) {
110+
log.warn("["+nodeErrors[i].name+"] "+nodeErrors[i].err);
116111
}
117-
log.warn("------------------------------------------");
112+
log.warn("------------------------------------------------------");
118113
}
119114
if (nodeMissing.length > 0) {
120115
log.warn(log._("server.missing-modules"));
@@ -148,7 +143,7 @@ function start() {
148143
}).otherwise(function(err) {
149144
console.log(err);
150145
});
151-
});
146+
});
152147
}
153148

154149
function reportMetrics() {

red/runtime/locales/en-US/runtime.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
},
121121
"localfilesystem": {
122122
"user-dir": "User directory : __path__",
123-
"flows-file": "Flows file : __path__",
123+
"flows-file": "Flows file : __path__",
124124
"create": "Creating new flow file",
125125
"empty": "Existing flow file is empty",
126126
"invalid": "Existing flow file is not valid json",

0 commit comments

Comments
 (0)