Textualize / textual-web

Run TUIs and terminals in your browser
MIT License
763 stars 18 forks source link

Feature Request: Crash logs & Session end hook #41

Open vpmartin opened 4 months ago

vpmartin commented 4 months ago
  1. Crash logs

It could be interesting for debugging purposes to have logs / traceback / exceptions saved to a file if the app crashes, in a per-session basis.

If the app quits gracefully (exit code 0?), the same "Session ended" message could be kept; otherwise, display something that looks like the usual "The system terminated in an unexpected manner, please contact your system administrator for more information and give them this number : XXX", with XXX being in the name of the log file or some kind of ID that is present in the filename.

  1. Session end hook

To push things further, a feature that could allow running a custom script when the session ends. It would allow plugging into alerting software such as Grafana's, sending an e-mail or a Telegram message, etc.

The rationale for all of this is that while in development, debugging is very easy; however once deployed in production through textual-web, the app's behavior becomes quite opaque, and it's even harder to debug if the error did not happen to ourselves but to an user.