logging on send
This commit is contained in:
parent
cf97fa066c
commit
1921bc619a
@ -65,6 +65,8 @@ class mqtt_client(object):
|
||||
self.__client__.subscribe(topic)
|
||||
|
||||
def send(self, topic, payload):
|
||||
logger.debug("Sending message with topic %s and payload %s",
|
||||
topic, str(payload))
|
||||
self.__client__.publish(topic, payload)
|
||||
|
||||
def __on_connect__(self, client, userdata, flags, rc):
|
||||
@ -75,7 +77,7 @@ class mqtt_client(object):
|
||||
for topic in self.__callbacks__:
|
||||
self.__client__.subscribe(topic)
|
||||
self.__block_add_callbacks__ = False
|
||||
|
||||
|
||||
def __on_disconnect__(self, client, flags, rc):
|
||||
logger.warning("Disconnect with rc=%d", rc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user