consrv
consrv copied to clipboard
feature request: consrv-side buffering for interrupted connections
Hey 👋
I started using consrv recently (blog post coming soonish) :)
I not only use serial console for interactive on-demand access, but also for continuous, always-on logging.
Because I started suspending my PC to RAM over night, I have gaps in my serial console logs.
I was wondering what you think about making consrv store serial logs (either in RAM, and/or on disk) while the client is disconnected? Once the client reconnects, consrv would stream what the client missed.
Thanks
Sounds cool! I'd be happy to accept a PR.
Thinking more about it, the following approach seems simpler overall: instead of making consrv do all the buffering and replay, we could instead just launch a goroutine that reads from the mux device and prints to stdout. In combination with https://github.com/gokrazy/syslogd and https://gokrazy.org/userguide/remotesyslog/, the logs can either be sent to a central syslog server, or sent to localhost and persisted to RAM or any other available storage via syslogd.
Yep, seems reasonable to me.