Cleanup: Remove all print() calls from the code #2341

Open
jleclanche opened this Issue Jan 6, 2017 · 2 comments

Projects

None yet

3 participants

@jleclanche
Contributor

Scattered around the codebase is a bunch of print() calls.

Pillow should instead use logging; that is, if the calls are at all relevant. In my latest PR I dropped a bunch of them already, most of which were commented out.
A bunch of them are behind a DEBUG flag as well, which can also be dropped if put behind logging.debug instead.

Here is an example of how to set up a consistent logging module across a library. But imho, it's not even necessary.

@wiredfool
Member

No. We've discussed this before, but the upshot is that anything in logging.debug really needs to be useful to django folks, and the print statement level logging is Pillow dev level logging. We're still overspamming that level of logging, to the point that when we get a backtrace on a test failure, it's almost never close to relevant.

@jleclanche
Contributor

needs to be useful to django folks

Huh? With an appropriately named logger this is a non-issue. requests for example has a ton of logging.debug calls that aren't "useful to django folks" and they never show up in django logs.

@aclark4life aclark4life added this to the Future milestone Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment