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

could we write normal log into stderr? #37

Open
Hexilee opened this issue Jun 2, 2023 · 0 comments
Open

could we write normal log into stderr? #37

Hexilee opened this issue Jun 2, 2023 · 0 comments

Comments

@Hexilee
Copy link

Hexilee commented Jun 2, 2023

As https://github.com/pingcap/log/blob/master/log.go#L53, if we don't customize cfg.File, normal log will be written into stdout, which pollutes the stdout of applications in the downstream.

I see this library distinguishes normal log and error log, and they are designed to be written into different places. So I propose two solutions:

  1. write all log into stderr by default (may be incompatible)
  2. keep the default behavior and add an option to allow normal log to be written into stderr (currently only support file path)
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

No branches or pull requests

1 participant