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

Quieter output on check-status #1100

Closed
peruzzof opened this issue Jun 30, 2021 · 6 comments
Closed

Quieter output on check-status #1100

peruzzof opened this issue Jun 30, 2021 · 6 comments
Assignees
Labels
enhancement New feature or enhancement good first issue Good for newcomers

Comments

@peruzzof
Copy link

What enhancement would you like to see?
I would like to disable all warnings when using --check-status together with --quiet (that is the behaviour prior to issue #1026 ). It can be implemented as another flag (--quieter or --no-warnings)

What problem does it solve?
I am using a script with some failing scenarios being handled by the return code and I prefer a cleaner output, without the warnings.

Provide any additional information, screenshots, or code examples below:

@peruzzof peruzzof added enhancement New feature or enhancement new Needs triage. Comments are welcome! labels Jun 30, 2021
@dkreeft
Copy link
Contributor

dkreeft commented Oct 5, 2021

Is this something that we want to implement? I know I would like this and I can work on it.

@BoboTiG BoboTiG changed the title Quieter ouput on check-status Quieter output on check-status Oct 6, 2021
@BoboTiG
Copy link
Contributor

BoboTiG commented Oct 6, 2021

@peruzzof what is your use case? Could you provide an example?

It seems it could be solved by redirecting stderr to /dev/null:

$ http --check-status --quiet pie.dev/status/500 2>/dev/null

@peruzzof
Copy link
Author

peruzzof commented Oct 6, 2021

¥es, it is possible to redirect stderr to /dev/null.
I am using in a shell script with other commands in a while loop, redirecting the stderr is possible but doesnt look nice.

@BoboTiG
Copy link
Contributor

BoboTiG commented Oct 7, 2021

OK I see. We would be happy to improve the situation then.

@dkreeft if you are motivated, we thought about allowing to repeat --quiet to force silencing all output.

Example:

# Current behavior, it should not be changed
$ http --check-status --quiet pie.dev/status/500 

__main__.py: warning: HTTP 500 Internal Server Error

$ echo $?
5
# New behavior
# http --check-status --quit --quiet pie.dev/status/500 
$ http --check-status -qq pie.dev/status/500
$ echo $?
5

We already have an option that can be repeated: --compress. The implementation should be quite similar :)

@BoboTiG BoboTiG added good first issue Good for newcomers and removed new Needs triage. Comments are welcome! labels Oct 7, 2021
@dkreeft
Copy link
Contributor

dkreeft commented Oct 7, 2021

@BoboTiG @peruzzof great! Thanks for the fast replies, will try to work on this in the coming days.

@BoboTiG
Copy link
Contributor

BoboTiG commented Oct 8, 2021

Done in #1175. Thanks again @dkreeft 💪

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

No branches or pull requests

3 participants