-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
pip-tools logger should always go to stderr #362
Comments
Rather than write to stdout via click.echo, use Python's built-in logging mechanism. This is a bit more conventional and could allow users to configure logs more thoroughly. It should also resolve jazzband#362. To match the ANSI colors, this now imports the coloredlogs module.
This looks like a duplicate of #353 |
Issue #353 is related in that fixing this issue could very well wind up fixing that one. But, for example, it's possible that not all of |
I believe it's fixed in #834. |
I noticed that pip-tools's logger (called
LogContext
here) sometimes writes to stdout (depending on the log level).It would be best if the logger always writes to stderr since a logger is for monitoring / diagnostic purposes, and its messages can interfere if one is trying to capture the "output" portion of running the script. This would help in addressing some of the other pip-tools issues related to stdout and stderr.
In cases where stdout is needed, a separate function can be used (e.g.
print()
). This would help in separating pip-tools's "API" (stdout) from its diagnostic / progress reporting (stderr).The text was updated successfully, but these errors were encountered: