From 4fb30ba2d8e7cb52ecadcdd0bcd80d4957b7805f Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 11 Jul 2020 19:09:43 +0200 Subject: [PATCH] Log number of topics on connect Signed-off-by: Knut Ahlers --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 70bca4c..e56cff9 100644 --- a/main.py +++ b/main.py @@ -29,7 +29,9 @@ class MQTT2InfluxDB(): if result != mqtt.MQTT_ERR_SUCCESS: 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): points = []