From 650168da00f45f94e3c00c07d0faeb77904263f2 Mon Sep 17 00:00:00 2001 From: Olivier Verhaegen <56387556+OlivierVerhaegen@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:01:10 +0200 Subject: [PATCH] Improvements to logging --- io/stomp/18-stomp.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/io/stomp/18-stomp.js b/io/stomp/18-stomp.js index 8430ad7c..f1f92124 100644 --- a/io/stomp/18-stomp.js +++ b/io/stomp/18-stomp.js @@ -258,14 +258,13 @@ module.exports = function(RED) { // Disconnection already in progress or not connected callback(); } else { - node.log("Unsubscribing from STOMP queue's..."); const subscribedQueues = Object.keys(node.subscriptionIds); subscribedQueues.forEach(function(queue) { node.unsubscribe(queue); }); node.log('Disconnecting from STOMP server...'); waitDisconnect(node.client, 2000).then(() => { - node.log("Disconnected from STOMP server", {sessionId: node.sessionId, url: `${node.options.address}:${node.options.port}`, protocolVersion: node.options.protocolVersion}) + node.log(`Disconnected from STOMP server, sessionId: ${node.sessionId}, url: ${node.options.address}:${node.options.port}, protocolVersion: ${node.options.protocolVersion}`) }).catch(() => { node.log("Disconnect timeout closing node..."); }).finally(() => { @@ -323,7 +322,7 @@ module.exports = function(RED) { delete node.subscriptionIds[queue]; if (node.connected && !node.closing) { node.client.unsubscribe(queue, headers); - node.log(`Unsubscribed from ${queue}`, headers); + node.log(`Unsubscribed from ${queue}, headers: ${headers}`); } }