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

enhancement(cli)!: Write logs to stderr #9166

Merged
merged 3 commits into from
Sep 17, 2021
Merged

Conversation

jszwedko
Copy link
Member

Rather than stdout. This change was made because:

  • It makes it easier to redirect console sink output which defaults to
    stdout
  • stderr is typically unbuffered so diagnostic messages are less likely
    to be lost
  • Users typically expect diagnostic output on stderr. stdout is for
    application output.

Closes: #1740

Signed-off-by: Jesse Szwedko jesse@szwedko.me

Rather than stdout. This change was made because:

* It makes it easier to redirect `console` sink output which defaults to
  stdout
* stderr is typically unbuffered so diagnostic messages are less likely
  to be lost
* Users typically expect diagnostic output on stderr. stdout is for
  application output.

Closes: #1740

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@netlify
Copy link

netlify bot commented Sep 15, 2021

✔️ Deploy Preview for vector-project ready!

🔨 Explore the source changes: b5485f2

🔍 Inspect the deploy log: https://app.netlify.com/sites/vector-project/deploys/6143c5e60caf8c0008aa7f67

😎 Browse the preview: https://deploy-preview-9166--vector-project.netlify.app

Copy link
Contributor

@binarylogic binarylogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users typically expect diagnostic output on stderr. stdout is for application output.

I was not aware of that.

@binarylogic
Copy link
Contributor

What do you think about adding information about the stream usage on this page?

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko
Copy link
Member Author

What do you think about adding information about the stream usage on this page?

Good call, added in 2a174dc

@jszwedko jszwedko enabled auto-merge (squash) September 16, 2021 22:32
@jszwedko jszwedko merged commit 6bf01f1 into master Sep 17, 2021
@jszwedko jszwedko deleted the write-diagnostics-to-stderr branch September 17, 2021 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write application logs to stderr
3 participants