1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Switch RED.events.DEBUG messages to warn to get stacktraces

This commit is contained in:
Nick O'Leary 2020-06-14 23:43:15 +01:00
parent 0e454b08c8
commit 0541d9189d
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -36,15 +36,15 @@
var evt = arguments[0]
var args = Array.prototype.slice.call(arguments,1);
if (RED.events.DEBUG) {
console.log(evt,args);
console.warn(evt,args);
}
if (handlers[evt]) {
for (var i=0;i<handlers[evt].length;i++) {
try {
handlers[evt][i].apply(null, args);
} catch(err) {
console.log("RED.events.emit error: ["+evt+"] "+(err.toString()));
console.log(err);
console.warn("RED.events.emit error: ["+evt+"] "+(err.toString()));
console.warn(err);
}
}