|
@@ -219,7 +219,11 @@ const startListening = () => {
|
|
});
|
|
});
|
|
|
|
|
|
mqttClient.on('error', (error) => {
|
|
mqttClient.on('error', (error) => {
|
|
- console.log('[mqttServiceForDevice] 设备mqtt出现错误:', JSON.stringify(error));
|
|
|
|
|
|
+ console.error('[mqttServiceForDevice] 设备mqtt出现错误:', {
|
|
|
|
+ message: error.message,
|
|
|
|
+ code: error.code,
|
|
|
|
+ stack: error.stack
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
mqttClient.on('message', (topic, message) => {
|
|
mqttClient.on('message', (topic, message) => {
|