-
Notifications
You must be signed in to change notification settings - Fork 532
Better console conventions - decouple console format logic from output formatting, ensure stdout is for output only #473
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
Conversation
Hm, I don't know if we actually want the log.info stuff to go only to stderr. I'll have to think about this a bit. |
Hi @terriko , to try to persuade you 😃 I compiled some links, which agree that all sorts of diagnostics (logs, including non-errors) should go to stderr: There are also some which disagree or do not clearly agree: |
Thank you! Alas, the problem is not that I'm unconvinced so much as that I don't have time to sit and properly make a decision. Between my regular job, GSoC, and childcare I'm basically working 3 jobs at once right now, plus now PyCon wants us to upload videos of our talks since the conference itself is cancelled. Since this PR isn't as urgent, it's probably going to wait until at least GSoC and PyCon have quieted down for me. |
Has this been updated to work with a3afc9e? |
@pdxjohnny no it has not. I'll have a closer look soon, but a quick glance shows that only the "console" choice will need to be lightly amended, and any documentation. |
@pdxjohnny I have implemented the changes which I believe make this PR make sense with a3afc9e. |
Codecov Report
@@ Coverage Diff @@
## master #473 +/- ##
==========================================
- Coverage 86.52% 86.38% -0.14%
==========================================
Files 60 60
Lines 2411 2409 -2
Branches 488 489 +1
==========================================
- Hits 2086 2081 -5
- Misses 212 214 +2
- Partials 113 114 +1
Continue to review full report at Codecov.
|
Okay, finally got some time to think about it and look at the output that we currently have. I think you're right, stderr is the right place for all the messages, and it's especially obvious now that we have multiple output formats. Thanks so much for this, and sorry it took so long for me to give it the attention it deserved! |
No worries at all, I say it was a very reasonable turnaround time 😄 |
As mentioned in #425 the
console
format does not make much sense because it is a CSV anyway.This PR fixes this.
Furthermore, to make the console output more useful (in the spirit of #267), I have ensured that logging only goes to
stderr
instead ofstdout
so it is easier to do things in the shell e.g. pipe output of cve-bin-tool to grep.