gamevault-app
gamevault-app copied to clipboard
View logs from admin panel in app.
Especially when troubleshooting, it would be super-helpful to be able to view the server logs from the admin panel in the frontend app.
Perhaps, when selected, a window shows up that displays the logs, allowing the user to scroll up and review. This would also allow the user to copy the logs to the clipboard for more in-depth review in another program, if desired.
What do you think?
Addressing this issue might be a bit challenging. To provide a comprehensive solution, there are a few considerations:
-
Fetching Past Logs: To access past logs, users would need to enable log file saving. Or we just write the log twice, once in /tmp and once into the /logs directory However, this could lead to large log files in /tmp, potentially causing issues on continuously running servers in debug mode. There would be a need for a rolling logger with a FIFO mechanism that only saves the latest 10000 logs or so.
-
Live-streaming Future Logs: To keep the log updated in real-time, we'd have to consider either implementing WebSocket or a streaming API connection which is quite a hassle
Simplest Approach: Another option is to write logs to a file with a rolling log mechanism. We could then offer users the latest portion of the logs (e.g., the last 10,000 lines) and include a traditional refresh button for updates.
Please let me know your preference or if you have any other suggestions on how to best address this.
We could start with the simple approach for now and gradually improve it if necessary with fancy features like live updates etc.