Improve logging
This commit is contained in:
parent
7185e32734
commit
c7ee716dbe
|
@ -76,6 +76,9 @@ def reconnecting_client(host: str, *, keepalive: int = 60):
|
|||
client = Client()
|
||||
client.on_connect = lambda client, userdata, flags, rc: \
|
||||
_logger.debug("Connected to mqtt host")
|
||||
client.on_disconnect = lambda client, userdata, rc: \
|
||||
_logger.debug("Disconnected from mqtt host")
|
||||
client.enable_logger(_logger.getChild("paho"))
|
||||
client.connect_async(host, keepalive=keepalive)
|
||||
client.loop_start()
|
||||
return client
|
||||
|
|
Loading…
Reference in New Issue
Block a user