Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Apr 29, 2019
1 parent b67d099 commit 8cdeb23
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/MqttClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function init (config) {
* Function called when MQTT client connects
*/
function onConnect () {
this.debug('MQTT client connected')
this.debug('CONNECTED')
this.emit('connect')

if (this.toSubscribe) {
Expand All @@ -99,7 +99,7 @@ function onConnect () {
* Function called when MQTT client reconnects
*/
function onReconnect () {
this.debug('MQTT client reconnecting')
this.debug('RECONNECTING')
}

/**
Expand All @@ -114,14 +114,14 @@ function onError (error) {
* Function called when MQTT client go offline
*/
function onOffline () {
this.debug('Client offline')
this.debug('OFFLINE')
}

/**
* Function called when MQTT client is closed
*/
function onClose () {
this.debug('Client closed')
this.debug('CLOSED')
}

/**
Expand Down Expand Up @@ -179,7 +179,7 @@ MqttClient.prototype.getStatus = function () {
MqttClient.prototype.update = function (config) {
this.close()

this.debug(`Restarting Mqtt Client after update...`)
this.debug(`RESTARTING`)

init.call(this, config)
}
Expand Down

0 comments on commit 8cdeb23

Please sign in to comment.