Skip to content

Commit

Permalink
feat(playground): added newer uvls binary and enable better request l…
Browse files Browse the repository at this point in the history
…ogging
  • Loading branch information
JannisDommer committed Nov 3, 2023
1 parent 01b6b03 commit f214308
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Binary file modified WebSocketLanguageServer/lib/uvls
Binary file not shown.
16 changes: 15 additions & 1 deletion WebSocketLanguageServer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,27 @@ const launchLanguageServer = (socket: IWebSocket) => {
}
if (Message.isResponse(message)) {
console.log(`${serverName} Server sent:`);
console.log(message);
logObjectRecursively(message);
}
return message;
});
}
};

function logObjectRecursively(obj, depth = 0) {
const indent = ' '.repeat(depth);
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === 'object' && obj[key] !== null) {
console.log(`${indent}${key}:`);
logObjectRecursively(obj[key], depth + 1);
} else {
console.log(`${indent}${key}: ${obj[key]}`);
}
}
}
}

export const runUVLServer = () => {
process.on('uncaughtException', function (err: any) {
console.error('Uncaught Exception: ', err.toString());
Expand Down

0 comments on commit f214308

Please sign in to comment.