Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Print errors, tracing and debugging information to stderr instead of stdout #1308

Conversation

paul-dingemans
Copy link
Collaborator

Description

Ideally only the output of rule violations is printed to stdout so that it can be redirected
to the reporters. Normal log lines most likely break the format of the reporter and therefore
should be printed to stderr.

Closes #1137

Checklist

  • tests are added
  • CHANGELOG.md is updated

Paul Dingemans and others added 2 commits December 12, 2021 21:44
…stdout

Ideally only the output of rule violations is printed to stdout so that it can be redirected
to the reporters. Normal log lines most likely break the format of the reporter and therefore
should be printed to stderr.

Closes pinterest#1137
@romtsn
Copy link
Collaborator

romtsn commented Dec 20, 2021

I believe @Tapchicoma had a slightly different idea - to use some proper logging solution for that -> #589

(here comes the joke about log4j indeed)

@paul-dingemans
Copy link
Collaborator Author

I believe @Tapchicoma had a slightly different idea - to use some proper logging solution for that -> #589

(here comes the joke about log4j indeed)

In the end that will be a better solution. Meanwhile, this PR still adds value as it once more has been checked that no output is written to stdout that interferes with the reporters.

@paul-dingemans
Copy link
Collaborator Author

I believe @Tapchicoma had a slightly different idea - to use some proper logging solution for that -> #589
(here comes the joke about log4j indeed)

In the end that will be a better solution. Meanwhile, this PR still adds value as it once more has been checked that no output is written to stdout that interferes with the reporters.

@romtsn See #1327 for implementation of logging framework. This PR can be closed once that PR has been approved and merged.

@romtsn
Copy link
Collaborator

romtsn commented Jan 21, 2022

yeah let's try to push #1327 through, closing this

@romtsn romtsn closed this Jan 21, 2022
@paul-dingemans paul-dingemans deleted the 1137-restrict-printing-to-stdout branch February 5, 2022 11:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken output JSON with warnings
3 participants