OlofBlomqvist / odd-box

dead simple reverse proxy and webserver
https://odd-box.cruma.io/
MIT License
9 stars 1 forks source link

fix: ws-logs in non-tui mode #13

Closed OlofBlomqvist closed 3 months ago

OlofBlomqvist commented 3 months ago

When starting in non-tui mode, we did not use our custom layer for submitting log messages to the ws broadcaster.. thus no messages were received by the clients...

This PR adds a new layer for non-tui mode (and uses it) and moves most code related to this in to a separate logging.rs file instead of it cluttering up main and tui.rs..

note: this pr also changes the endpoint for logs from /ws to /ws/live_logs, as we will want to provide different websocket endpoints (for example 'stats')