소스 검색

chore(logging): configure logging for device mqtt messages

sw 3 주 전
부모
커밋
8a090544a4
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/domain/mqttServiceForDevice.ts

+ 3 - 0
src/domain/mqttServiceForDevice.ts

@@ -147,6 +147,9 @@ const startListening = () => {
   });
 
   mqttClient.on('message', (topic, message) => {
+    console.log(
+      `【接收设备mqtt消息】 topic是 ${topic} , message : ${JSON.parse(message.toString())}`
+    );
     if (topic === MQTT_TOPIC) {
       const parsedMessage: MqttMessage = JSON.parse(message.toString());
       handleMqttMessage(parsedMessage);