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
Group output option #89
Comments
As of right now, none of the three formatting options is very helpful for debugging when using this to start multiple packages in a "development" mode. I would even be grateful to see something like https://www.npmjs.com/package/concurrently does where every line logged is prepended with the package name - something like:
|
Yea prefix is helpful for watching, grouping is very useful for readable logs for one-time builds. |
While running, logs are being truncated to try to show you an overview of what's happening, but once all processes finish, the full log is being flushed to the output, so effectively showing grouped output. Could you clarify the kind of behavior you'd be looking for instead? Apart from that, the prefix makes sense for sure. I'll make an other issue to have this implemented. |
@folke I'm running watched builds in 7 different packages as part of a monorepo setup. The logs in this case aren't so much about build errors as they are about app logs from the running process (eg. errors getting surfaced if API requests are missing parameters, etc.). Because the truncated logs are so short and the error trace is often so long, it's not really possible as-is to see what happened without dropping out of ultra and running the process independently. There are a few possible solutions in my mind - prefixed lines, untruncated flags, configurable writing to a logfile, etc. Basically anything that makes reviewing server log output simple. |
@tshelburne thank you for clarifying. I actually have a very similar setup for another project, but the errors are pretty small in my case most of the time. Unfortunately it's pretty hard to make the truncation configurable. The reason for this is that I'm using terminal escape sequences to change the output. It's not possible to change output beyond what's visible on the screen. So you can't use a screen buffer bigger than your terminals amount of rows. The only way I can think of to make this happen, would be using an ncurses like interface as blessed, but this would be beyond the scope of |
As mentioned before, for one off builds, I've also just released v3.4.1 which now properly adds the current package name to the Hope this helps! |
When running things concurrently using
--no-pretty
, the logs are mixed together from all the different processes.You could have an option, or default to, to log out the outputs in groups. You'd have to wait for them to end of course and then just output the whole thing for each one as it ends.
Perhaps as
--group-logs
, though tbh it's a reasonable default.The text was updated successfully, but these errors were encountered: