Add logging and some code improvement

This commit is contained in:
Evgenii Abramov
2021-05-16 20:33:00 +03:00
parent 03fe4e0d8d
commit 4e108d3e57

2
app.js
View File

@@ -152,7 +152,7 @@ global.mqttClient = mqtt.connect(`mqtt://${config.mqtt.host}`, {
}
}, res => {
res.on('data', d => {
global.logger.log('info', {message: `${d}`});
global.logger.log('error', {message: `${d}`});
});
});