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

Add second level of --verbose to workspaces foreach to permit specifying less logging. #6034

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

seansfkelley
Copy link
Contributor

@seansfkelley seansfkelley commented Dec 22, 2023

What's the problem this PR addresses?

Fixes #6033.

How did you fix it?

Changes the -v,--verbose flag in workspaces foreach to be a counter rather than a boolean. With one level it prints prefixes, with two levels it additionally prints start/finish/timing information (as was the behavior before).

The default TTY behavior has not changed (maximum verbosity). The behavior with a single --verbose has changed, to be less verbose.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz
Copy link
Member

merceyz commented Dec 22, 2023

Perhaps supporting different levels of verbose would be better than another flag?

Somewhat inspired by ssh; for example -v could enable labels and -vv labels and timings.
https://man7.org/linux/man-pages/man1/ssh.1.html

EDIT: You wrote this already, I somehow missed that.

@seansfkelley
Copy link
Contributor Author

Yeah, after I wrote the implementation I realized that that could be an option:

I'm also open to the idea of having multiple levels of verbosity, where -v would be just labels and -vv would be labels and start/stop/timing.

I'm happy to change it. I don't have a preference. Do you?

@merceyz
Copy link
Member

merceyz commented Dec 22, 2023

Heh, I missed that part of the description, my bad.

Yeah, I'd prefer the multiple -v flags.

This allows specifying _less_ verbosity than the current --verbose flag,
which helps avoid cluttering the output when the task being run is not
expected to generate output (and we don't care about timing).
@seansfkelley
Copy link
Contributor Author

Alright, updated and force-pushed to rewrite out the old implementation.

@seansfkelley seansfkelley changed the title Add --label argument to workspaces foreach. Add second level of --verbose to workspaces foreach to permit specifying less logging. Jan 2, 2024
@arcanis arcanis merged commit a733b47 into yarnpkg:master Jan 3, 2024
20 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add -l,--label argument to workspaces foreach as a step down from -v,--verbose.
3 participants