vladak / shield

code for ESP32 Adafruit Feather to get various sensor readings and publish them to MQTT broker
2 stars 0 forks source link

log via MQTT #3

Closed vladak closed 1 year ago

vladak commented 1 year ago

A logging handler can be used that would send the messages to a MQTT topic, making it easier to observe what is going on even without serial console.

vladak commented 1 year ago

It would be nice to be able to implement MQTTHandler, similarly to the other pre-existing CPython handlers, like SMTPHandler, however adafruit_logging can only use one handler currently: https://github.com/adafruit/Adafruit_CircuitPython_Logging/blob/a67856d9aae8fff3d2e6dee8a5cdc6082061ef42/adafruit_logging.py#L298-L306

vladak commented 1 year ago

With MQTT handler in place, the question is what to do with logging inside the MQTT callbacks.