better logging

This commit is contained in:
AJ ONeal 2018-06-29 11:02:44 +00:00
parent 6e60fc1750
commit a3b8cd6799
1 changed files with 4 additions and 3 deletions

View File

@ -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) {