[feature request] logs in ui
I would like to see logs emitted by a job in a pane in the UI alongside the errors and so on.
I think this could be implemented by storing a slog logger in the context and providing a helper to retrive it. Of course this would only work with applications structured around an explicit non-global logger. Probably you'd also want to limit the max log size to avoid disk space issues?
I'm aware this would be a bunch of work and isn't essential but I think it'd be useful.
Spoke to @bgentry about this one. I think we're both on board in that this would be a cool feature, but we want to make sure it's flexible enough to cover all kinds of set ups, and that's a little non-trivial. For example, especially for a larger operation, it's not a particularly good idea to store logs directly in the database, so we'd want to have some way for those users to specify some kind of "fetch hook" that'd be able to reach out and pull logs for a job from the right place to show them inline with the UI.
There should probably be a simple version too that provides an option to put logs into metadata or something for easy out-of-the-box use.
We added logs support to River in v0.21.0 (https://github.com/riverqueue/river/blob/master/CHANGELOG.md#0210---2025-05-02) and we have support for displaying them in River UI's master. There's a couple more changes that we want to go in before cutting a release, but this is close.
This is available in the UI as of riverui v0.10.0. I think the only thing missing is web documentation about the riverlog package and accessing these logs in the UI.