Pioreactor / pioreactor

Hardware and software for accessible, extensible, and scalable bioreactors. Built on Raspberry Pi.
https://pioreactor.com
MIT License
100 stars 9 forks source link

New log topic(s) for MQTT #505

Closed CamDavidsonPilon closed 5 months ago

CamDavidsonPilon commented 5 months ago

We currently publish logs to

pioreactor/{unit}/{experiment}/logs/{source}

Most logs are DEBUG, and so when a user is in the UI, all debug messages are sent to them, and the client filters for INFO+. This seems like a waste of networking time and CPU. What if there was an easier way for the UI to grab INFO+ from MQTT?

Partition by level

pioreactor/{unit}/{experiment}/logs/{source}/{level}

and the UI subscribes to the specific levels. Unfortunately, MQTT doesn't have a inequality-wildcard, so we need to subscribe to each topic manually.