From e3a8044a38d7a58a79f05626781ef230accfe346 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 14 Sep 2015 03:38:52 -0700 Subject: [PATCH 1/2] Removing low level PyAccess debug logging --- PIL/PyAccess.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PIL/PyAccess.py b/PIL/PyAccess.py index cb4f00cad..0d4c8b235 100644 --- a/PIL/PyAccess.py +++ b/PIL/PyAccess.py @@ -54,7 +54,9 @@ class PyAccess(object): self.xsize = vals['xsize'] self.ysize = vals['ysize'] - logger.debug("%s", vals) + # Debugging is polluting test traces, only useful here + # when hacking on PyAccess + #logger.debug("%s", vals) self._post_init() def _post_init(self): @@ -310,7 +312,6 @@ def new(img, readonly=False): if not access_type: logger.debug("PyAccess Not Implemented: %s", img.mode) return None - logger.debug("New PyAccess: %s", img.mode) return access_type(img, readonly) # End of file From 43f3e7504cab52ba2c1954dae6c76aee861ac71d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 14 Sep 2015 03:42:08 -0700 Subject: [PATCH 2/2] Removing spammy debug logging --- PIL/Image.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index 0f11ad7a9..ce000d264 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -2309,7 +2309,10 @@ def open(fp, mode="r"): _decompression_bomb_check(im.size) return im except (SyntaxError, IndexError, TypeError, struct.error): - logger.debug("", exc_info=True) + # Leave disabled by default, spams the logs with image + # opening failures that are entirely expected. + #logger.debug("", exc_info=True) + continue return None im = _open_core(fp, filename, prefix)