From a3b8cd6799828b4232dc39be429db01111b16c97 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 29 Jun 2018 11:02:44 +0000 Subject: [PATCH] better logging --- lib/relay.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/relay.js b/lib/relay.js index c6b3278..65656ad 100644 --- a/lib/relay.js +++ b/lib/relay.js @@ -257,7 +257,7 @@ var Server = { newAuth = JSON.stringify(newAuth); } - console.log('check for upgrade token'); + console.log('[onAuth] check for upgrade token'); if (grant.jwt && newAuth !== grant.jwt) { console.log('new token to send back'); // Access Token @@ -288,7 +288,7 @@ var Server = { return state.Promise.reject(err); } - console.log('strolling through pleasantries'); + console.log('[onAuth] strolling through pleasantries'); // Add the custom properties we need to manage this remote, then add it to all the relevant // domains and the list of all this websocket's grants. grant.domains.forEach(function (domainname) { @@ -417,7 +417,7 @@ var Server = { }); } , addToken: function addToken(state, srv, newAuth) { - console.log("addToken", newAuth); + console.log("[addToken]", newAuth); if (srv.grants[newAuth]) { console.log("addToken - duplicate"); // return { message: "token sent multiple times", code: "E_TOKEN_REPEAT" }; @@ -587,6 +587,7 @@ module.exports.create = function (state) { }); if (initToken) { + console.log('[wss.onConnection] token provided in http headers'); return Server.addToken(state, srv, initToken).then(function () { Server.init(state, srv); }).catch(function (err) {