mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-26 10:17:18 +00:00
add catched error to log
This commit is contained in:
+2
-2
@@ -202,7 +202,7 @@ class MyPSACC:
|
||||
client.subscribe(topic)
|
||||
logger.info("subscribe to " + topic)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
def on_mqtt_disconnect(self, client, userdata, rc):
|
||||
try:
|
||||
@@ -211,7 +211,7 @@ class MyPSACC:
|
||||
# reconnect then subscriptions will be renewed.
|
||||
logger.warn(mqtt.error_string(rc))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
def on_mqtt_message(self, client, userdata, msg):
|
||||
logger.info(f"mqtt msg {msg.topic} {str(msg.payload)}")
|
||||
|
||||
Reference in New Issue
Block a user