-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for mixed outputs #43
Comments
Hi! I’ve been wanting this occasionally too. My first thought: On the dashboard, have a keybinding for entering a readonly mixed mode where you get output from all commands. However, in some projects I have like 15 commands and I’m only interested in 3. So maybe there should be a way of choosing which commands you want on the dashboard, and then entering readonly mixed mode for those. I suppose each line of output should be prefixed, so you know which lines comes from which command. The prefix should probably be in color. I guess we could use a default approach for making that prefix and choosing colors, and then the JSON file could have an optional field for specifying it. The most difficult thing – I think – is figuring how to do the actual interleaving. The most naive way would be to just print all data we receive in the order it comes, but tools do not always print an entire line in one go, and it would be annoying if you got something like this:
instead of:
It wouldn’t surprise me if other tools that do this have collected a fair bit of tricks and heuristics on how to do this as nicely as possible, but still with low latency. There’s also the question on what to do with commands that print cursor movements, clear the screen, or switch to the alternate screen. Not sure, maybe just let them wreak havoc? This will be the most useful for logs anyway (which, btw, sometimes use cursor movements within the line). So there we have it – an interesting feature, but also lots of details to get right and lots of exploration and testing to do! I’m not sure I’ll have time to work on it any time soon. Also note that I might not have time to review a PR properly either, given that I think this will be a somewhat complicated feature. You’re still welcome to make a PR in order to document learnings and edge cases, just be aware that it might not be merged. |
Notes:
However, if both Also, even if both write full lines but at the same time, it might be more ideal to have chunks of related lines come together rather than getting every second from different commands. |
When I have a bug I want to see specifically which process has logged a stack trace.
Currently I need to visit them one by one to know where the stack trace is.
It would be nice if we could show mixed outputs to cover this use case.
(pnpm supports running multiple processes with mixed outputs, but they don't have the "restart a single process" option which I need often for when a process crashes or when a config file is changed)
Thanks for the awesome package !
Up to work on this if this helps.
The text was updated successfully, but these errors were encountered: