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

Print content output to stdout and status output to stderr #30

Open
fredmorcos opened this issue Mar 13, 2022 · 3 comments
Open

Print content output to stdout and status output to stderr #30

fredmorcos opened this issue Mar 13, 2022 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@fredmorcos
Copy link
Owner

Currently it's a bit mixed up. But content output (like search results) should be printed to stdout and any other status messages should be printed to stderr.

@fredmorcos fredmorcos added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 13, 2022
@fredmorcos fredmorcos added this to the Be a good UNIX citizen milestone Mar 13, 2022
@fiplox
Copy link

fiplox commented Mar 14, 2022

Hello, I'd like to contribute :)
Where should I start from?
I see a print to stdout here which should probably be printed to stderr
and another one here.
Is this correct?

@fredmorcos
Copy link
Owner Author

Welcome!

Yes you are correct, those two calls should probably be eprintln!(...).

@fredmorcos
Copy link
Owner Author

I have a very full day today unfortunately. I will check the TVrank codebase again in the evening and give you pointers about other places that should be fixed.

Generally, the idea is that only search results should be on stdout and everything else should be on stderr. But it also should be clear what is a status message that should be printed to stderr using eprintln!(...) and what should be logged using warn!(...) , info!(...), etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants