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]: Add Silent or Quiet flag for CLI #1127

Closed
jase88 opened this issue Nov 30, 2023 · 4 comments
Closed

[FEAT]: Add Silent or Quiet flag for CLI #1127

jase88 opened this issue Nov 30, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jase88
Copy link

jase88 commented Nov 30, 2023

Is your feature request related to a problem? Please describe.

The output of cyclonedx-npm is pretty noisy, so that you have to scroll the log output.
We're generating a bom for every build with a caching mechanism by nx, but the log is printed every time by that mechanism.

Describe the solution you'd like

  • add a new flag --silent (-s) or --quiet (-q) so that the cli
    • only prints errors and suppresses logs or warnings
    • prints a minimal success message

Describe alternatives you've considered

  • supressing stdout, but this needs to work cross platform, which makes it complicated

Additional context

@jase88 jase88 added the enhancement New feature or request label Nov 30, 2023
@jkowalleck
Copy link
Member

jkowalleck commented Dec 1, 2023

Describe alternatives you've considered
supressing stdout, but this needs to work cross platform, which makes it complicated

why "needs to work cross platform"? you run the command on a specific environment you control, right?
Please help me understand.


Describe the solution you'd like
add a new flag --silent (-s) or --quiet (-q) so that the cli

  • only prints errors and suppresses logs or warnings
  • prints a minimal success message

I'd disagree. a silent/quite flag should not even print any error messages. it would suppress any log and messaging.
exit code is there for you, to check for success.

@jkowalleck
Copy link
Member

jkowalleck commented Dec 1, 2023

feel free to pullrequest a feature as decribed in the following:
see #158

  • use a logger, instead of printing directly to STDERR.
  • logger would have a configurable level, default to 'warning'.
  • logger would print to STDERR.
  • logger level can be increased via CLI switch --verbose ... -v|-vv|-vvv

@jkowalleck
Copy link
Member

duplicates #158

@jkowalleck jkowalleck closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@jkowalleck
Copy link
Member

@jase88 feel free to contribute #158
as it would solve your issue :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants