1
0
Fork 0
mirror of https://github.com/Luzifer/mqtt2influx.git synced 2024-10-18 05:44:19 +00:00

Log number of topics on connect

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-07-11 19:09:43 +02:00
parent e7ae8ac75f
commit 4fb30ba2d8
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -29,7 +29,9 @@ class MQTT2InfluxDB():
if result != mqtt.MQTT_ERR_SUCCESS: if result != mqtt.MQTT_ERR_SUCCESS:
raise(Exception('MQTT subscribe failed: {}'.format(result))) raise(Exception('MQTT subscribe failed: {}'.format(result)))
logging.info('MQTT connected and subscribed') logging.info('MQTT connected and subscribed to {n} topics'.format(
n=len(topics),
))
def on_message(self, client, userdata, msg): def on_message(self, client, userdata, msg):
points = [] points = []