From 083e8355b7e7282ac283960c68c8ed9055186be8 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 16 Apr 2022 13:37:17 +0800 Subject: [PATCH] Change debug to log.debug --- server/util-server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/util-server.js b/server/util-server.js index 52a813af..53b67985 100644 --- a/server/util-server.js +++ b/server/util-server.js @@ -99,12 +99,12 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) { } const timeoutID = setTimeout(() => { - debug("MQTT timeout triggered"); + log.debug("mqtt", "MQTT timeout triggered"); client.end(); reject("Timeout"); }, interval * 1000); - debug("MQTT connecting"); + log.debug("mqtt", "MQTT connecting"); let client = mqtt.connect(hostname, { port, @@ -113,7 +113,7 @@ exports.mqttAsync = function (hostname, topic, okMessage, options = {}) { }); client.on("connect", () => { - debug("MQTT subscribe topic"); + log.debug("mqtt", "MQTT subscribe topic"); client.subscribe(topic); });