Extract all core runtime messages

This commit is contained in:
Nick O'Leary
2015-05-08 14:21:01 +01:00
parent aa18c65fa8
commit 6249083431
13 changed files with 123 additions and 64 deletions

View File

@@ -65,7 +65,7 @@ function start() {
try {
msg = JSON.parse(data);
} catch(err) {
log.warn("comms received malformed message : "+err.toString());
log.trace("comms received malformed message : "+err.toString());
return;
}
if (!pendingAuth) {
@@ -119,12 +119,12 @@ function start() {
}
});
ws.on('error', function(err) {
log.warn("comms error : "+err.toString());
log.warn(log._("comms.error",{message:err.toString()}));
});
});
wsServer.on('error', function(err) {
log.warn("comms server error : "+err.toString());
log.warn(log._("comms.error-server",{message:err.toString()}));
});
lastSentTime = Date.now();
@@ -167,7 +167,7 @@ function publishTo(ws,topic,data) {
try {
ws.send(msg);
} catch(err) {
log.warn("comms send error : "+err.toString());
log.warn(log._("comms.error-send",{message:err.toString()}));
}
}