mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Improvements to logging
This commit is contained in:
parent
e129c676ec
commit
650168da00
@ -258,14 +258,13 @@ module.exports = function(RED) {
|
|||||||
// Disconnection already in progress or not connected
|
// Disconnection already in progress or not connected
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
node.log("Unsubscribing from STOMP queue's...");
|
|
||||||
const subscribedQueues = Object.keys(node.subscriptionIds);
|
const subscribedQueues = Object.keys(node.subscriptionIds);
|
||||||
subscribedQueues.forEach(function(queue) {
|
subscribedQueues.forEach(function(queue) {
|
||||||
node.unsubscribe(queue);
|
node.unsubscribe(queue);
|
||||||
});
|
});
|
||||||
node.log('Disconnecting from STOMP server...');
|
node.log('Disconnecting from STOMP server...');
|
||||||
waitDisconnect(node.client, 2000).then(() => {
|
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(() => {
|
}).catch(() => {
|
||||||
node.log("Disconnect timeout closing node...");
|
node.log("Disconnect timeout closing node...");
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
@ -323,7 +322,7 @@ module.exports = function(RED) {
|
|||||||
delete node.subscriptionIds[queue];
|
delete node.subscriptionIds[queue];
|
||||||
if (node.connected && !node.closing) {
|
if (node.connected && !node.closing) {
|
||||||
node.client.unsubscribe(queue, headers);
|
node.client.unsubscribe(queue, headers);
|
||||||
node.log(`Unsubscribed from ${queue}`, headers);
|
node.log(`Unsubscribed from ${queue}, headers: ${headers}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user