Skip to content
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

feat(core): improve run-command parallel logs #9006

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

bcabanes
Copy link
Member

@bcabanes bcabanes commented Feb 16, 2022

It appends the executed command on the result line, so it is easier to distinguish from which command the log line is related to. Format is [command] result line.

This change only affects the log when parallel is true.

This allows to search for a specific command while debugging, making it easier to aggregate logs by commands when using external log tooling (like Google Log Explorer).

Here is an example of how it looks like:

[nx run nx-dev:generate-og-images] Generating: public/images/open-graph/jest-jest.jpg
[nx run nx-dev:generate-og-images] Generating: public/images/open-graph/storybook-overview-angular.jpg
[nx run nx-dev:build] info  - Generating static pages (211/282)
[nx run nx-dev:generate-og-images] Generating: public/images/open-graph/storybook-overview-react.jpg
[nx run nx-dev:build]
Page                                                Size     First Load JS
┌ ○ / (2354 ms)                                     35.6 kB         547 kB
├   /_app                                           0 B            75.7 kB
├ ● /[...segments] (70426 ms)                       50.6 kB         558 kB
├   ├ /configuration/projectjson (4862 ms)
├   ├ /getting-started/nx-setup (3789 ms)
├   ├ /configuration/packagejson (2536 ms)
├   ├ /getting-started/nx-and-angular (2486 ms)
├   ├ /getting-started/intro (2089 ms)
├   ├ /getting-started/nx-and-typescript (2054 ms)
├   ├ /react-tutorial/05-add-node-app (2030 ms)
├   └ [+270 more paths]
├ ○ /404                                            194 B          75.9 kB
├ ● /community (427 ms)                             4.76 kB         223 kB
└ ○ /conf (508 ms)                                  14.6 kB         236 kB
+ First Load JS shared by all                       75.7 kB
  ├ chunks/framework-fd865f22cad73a01.js            42 kB
  ├ chunks/main-4ce32a13053c6681.js                 28.5 kB
  ├ chunks/pages/_app-33ad5e9b7056a25c.js           4.45 kB
  ├ chunks/webpack-514908bffb652963.js              770 B
  └ css/84a7f648ef6c4110.css                        12.4 kB
[nx run nx-dev:generate-og-images] Generating: public/images/open-graph/node-build.jpg
[nx run nx-dev:generate-og-images] Generating: public/images/open-graph/node-package.jpg

@vercel
Copy link

vercel bot commented Feb 16, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/DaugAA4sRvt7CNWQoiz2B1ma5NBy
✅ Preview: Canceled

[Deployment for de7bfdd canceled]

It appends the executed command on the result line, so it is easier to distinguish from which command the log line is related to.

This change only affects the log when `parallel` is `true`.
@bcabanes bcabanes force-pushed the feat/core/workspace/run-command branch from fc5ddb9 to de7bfdd Compare February 17, 2022 17:34
@bcabanes bcabanes merged commit 0f497b6 into nrwl:master Feb 17, 2022
@bcabanes bcabanes deleted the feat/core/workspace/run-command branch February 17, 2022 18:26
meeroslav pushed a commit to meeroslav/nx that referenced this pull request Mar 4, 2022
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant